Image processor

ABSTRACT

In an image forming apparatus, a black edge of a document image is emphasized, and the black edge is detected by deciding an edge from the lightness data and by deciding a black color from the chroma data. The data of cyan, magenta and yellow of a pixel at a black edge are replaced with minima of data of cyan, magenta and yellow of pixels in a prescribed region around the pixel. In order to prevent erroneous decision of a black edge, if a number of isolated pixels is larger than a threshold level, a decision as a pixel at a black edge is invalidated. Automatic exposure can be performed on a color document for correcting a background of the document obtained in a prescan. The background level of the document is determined only on pixels decided to be black. When color balance is adjusted on one of the data of cyan, magenta, yellow and black, the density is kept constant. A part of a color document is reproduced in a sheet of paper with use of different levels of an image forming condition such as edge emphasis. That is, image data on the same part of the color data are supplied repeatedly, while image forming condition on the color data are changed successively. Then, the color data of the part is formed repeatedly in a sheet of paper at different levels of the image forming condition.

This application is a divisional of application No. 09/472,436, filed onDec. 27, 1999, which is a divisional of application No. 08/578,947,filed on Dec. 27, 1995, now U.S. Pat. No. 6,064,494, which is acontinuation-in-part of application No. 08/559,313, filed on Nov. 15,1995, now U.S. Pat. No. 5,867,634.

This application is a continuation-in-part of an application filed onNov. 15, 1995.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to an image forming apparatus such as adigital color copying machine.

2. Description of the Prior Art

In a digital color copying machine, a document is read to obtain digitaldata of red, green and blue. The digital data are converted to imagedata of cyan, magenta, yellow and black to be reproduced on a sheet ofpaper. The digital data are subjected to various processing such asshading correction, density conversion, color correction, edge emphasis,smoothing, gamma correction and the like.

Prescan of the document is performed for determining the conditions onforming an image of the digital data in a sheet of paper. Data obtainedwith a prescan on a document to be reproduced is performed for detectionof document size, shading correction or the like. For example, automaticexposure is performed on prescan data for correcting image data toreproduce background of a document as white. However, the automaticexposure processing is effective only for a monochromatic characterimage because a reproduced image becomes dull for a color image or aphotograph image. It is desirable that automatic exposure processing isperformed for a color image or the like.

Auto color selection is also performed on prescan data to determine if adocument is a monochromatic image or a full color image. Image data onthe document is processed according to the auto color selection.

If the automatic exposure processing and the auto color selection areperformed at the same time, a document size has to be detectedbeforehand. Then, prescan data are used twice. However, it is notdesirable to perform prescan twice because it takes a longer time forcopying.

A digital copying machine reads a document to get digital data of red,green and blue thereof and converts them to image data of cyan, magenta,yellow and black, which are reproduced on a sheet of paper with tonershaving the four colors. The image data are subjected to MTF correctionbefore printing. For a document image comprising black characters, it isdesirable to emphasize edges of black characters. Then, for example,black characters are detected in a document image, and the image datafor the black characters are subjected to edge emphasis and arereproduced with black toners. Thus, the black characters are reproducedwith black toners, and the image quality is improved.

As to the black characters, image data of the cyan, magenta and yelloware suppressed at the edges according to brightness component of theimage data. However, if black characters are described in a coloredbackground, an amount of suppression of the image data of the cyan,magenta and yellow becomes large, so that areas adjacent to the blackcharacters become white though they have a color of the coloredbackground. This deteriorates image quality in a reproduced image.

Black characters are detected as black image in an area between a pairof edges. However, for characters of dark blue, dark green or the like,edges are liable to be decided erroneously. Further, for an imagecomprising black dots, edges are decided erroneously, a Moire patternmay happen. It is also a problem that in an electrophotographic copyingmachine, toners are liable to have a higher density at a leading edgeand a lower density at a trailing edge, and this also deteriorates imagequality of black characters.

A digital copying machine can control image qualities on various itemssuch as hue, chroma, color, balance and the like besides gammacorrection and edge emphasis. When a user wants a copy of a desiredimage quality, he or she adjusts the various items before startingcopying operation. If the reproduced image does not have the desiredimage quality, he or she has to adjust the various items again based onthe reproduced image. However, because a number of items to be adjustedis large, it is difficult to predict an image quality. Then, it isdesirable to adjust image quality efficiently.

As to color balance, density level of toners of cyan, magenta, yellowand blue is controlled independently of each other. Then, density on asheet of paper is also affected by adjustment of the color balance.Then, a total image density of a reproduced image may become higher orlower, and an amount of toners fixed on paper becomes uneven. It is alsoa problem that jam or the like may happen.

SUMMARY OF THE INVENTION

A first object of the present invention is to provide an image processorwhich performs prescan efficiently.

A second object of the present invention is to provide an imageprocessor which performs automatic exposure appropriately irrespectiveof kind of document.

A third object of the present invention is to provide an image processorwhich decides black characters more precisely for edge emphasis.

A fourth object of the present invention is to provide an image formingapparatus which is easy to be adjusted on image quality.

A fifth object of the present invention is to provide an image formingapparatus which can adjust color balance appropriately.

In an aspect of the invention, color data of a document is read by ascanner and the color data are converted to lightness data and chromadata, and a black edge is detected by deciding an edge from thelightness data and deciding a black color from the chroma data. Then,the data of black of an interest pixel is increased by a prescribedamount for edge emphasis if the pixel is decided to exist at a blackedge. Preferably, the color data are converted to data of cyan, magenta,yellow and black, and the data of cyan, magenta and yellow of a pixel ata black edge are replaced with minima of data of cyan, magenta andyellow of pixels in a prescribed region around the pixel. Preferably,for an isolated pixel, an amount to be added for edge emphasis islimited according to the density of the isolated pixels.

In a second aspect of the invention, in order to prevent erroneousdecision of a black edge, each of the pixels in a prescribed area aroundan interest pixel to be decided to exist at a black edge are checked ifit has a color based on the lightness data and chroma data and is notlocated at the edge. If the number of the pixels having colors and notexisting at the edge is larger than a threshold level, the decision as apixel at a black edge is invalidated.

In a third aspect of the invention, a black edge is detected by decidingan edge from the lightness data and by deciding a black color from thechroma data. On the other hand, area information on a document isreceived in synchronization with read of the document, and a type of thedocument is determined. Then, the data of the interest pixel are changedaccording to the type of the document and a result of decision of blackedge.

In a fourth aspect of the invention, a color document is read, and apixel at a rising edge and a pixel at a trailing edge of an image in thecolor data with respect to a paper-feed direction. Then, on edgeemphasis, a first correction data is added to a pixel located by onepixel before the rising edge, and a second correction data is added to apixel located one pixel after the trailing edge.

In a fifth aspect of the invention, automatic exposure is performed on acolor document for correcting a background of the document. Color dataof a color document are read, while a background of the document isobtained as a background level detected from a density histogram ofpixels decided to be black. That is, the background level is determinedonly on pixels decided to be black. Then, the color data are correctedaccording to the background level for automatic exposure. Alternately, astandard document such as a white plate is also read, and the data ofthe standard document is subjected to the shading correction. Abackground level is also determined only on pixels decided to be black.Then, the color data of the document are corrected according to adifference of the background level or the document from the backgroundlevel detected on the standard document so that a background level of animage formed on the sheet of paper has a prescribed value. Preferably,when color data of a document is read, an area wherein the documentexists on a platen is determined. Then, an underground level of thedocument and a type of the document such as full color document aredetermined on the same data in the area.

In a sixth embodiment of the invention, a part of a color document readby a scanner is formed in a sheet of paper with different levels of animage forming condition such as edge emphasis. That is, image data onthe same part of the color data are supplied repeatedly so that theplurality of image data is formed on a sheet of paper. A data processingmeans processes the part of the color data by changing the image formingcondition successively. Then, a plurality of color image of the partprocessed on the image forming condition is formed in a sheet of paper.

In a seventh aspect of the invention, a scanner reads a color documentto provide color data, and the color data are converted to data of cyan,magenta, yellow and black. When color balance is adjusted on one of thedata of cyan, magenta, yellow and black, the data for each pixel ofcyan, magenta, yellow and black are changed according to the colorbalance while keeping a total of the data of cyan, magenta, yellow andblack constant. That is, when color balance is adjusted, the density iskept constant.

An advantage of the invention is that edge emphasis is performedappropriately.

Another advantage of the invention is that erroneous decision of blackedge can be prevented for example on dark blue characters.

A third advantage of the invention is that an underground level of acolor document can be corrected appropriately.

A fourth advantage of the invention is that a document area, anunderground level and the like can be corrected in a single read of adocument data.

A fourth advantage of the invention is that a user can select desiredimage forming conditions easily.

A fifth advantage of the invention is that color balance can beperformed while keeping a constant density.

BRIEF DESCRIPTION OF THE DRAWINGS

These and other objects and features of the present invention willbecome clear from the following description taken in conjunction withthe preferred embodiments thereof with reference to the accompanyingdrawings, and in which:

FIG. 1 is a schematic sectional view of a digital color copying machineof an embodiment of the invention;

FIG. 2 is a plan view of an operational panel of the copying machine;

FIGS. 3A and 3B are block diagrams of a read signal processor;

FIG. 4 is a block diagram of an A/D converter;

FIG. 5 is a block diagram of a shading correction section;

FIG. 6 is a graph of D_(out) plotted against D_(in) for shadingcorrection;

FIG. 7 is a schematic diagram of a CCD image sensor;

FIG. 8 is a block diagram of a correction unit;

FIG. 9 is a timing chart of control signals and image data;

FIG. 10 is a diagram of shift of the image data of red (R), green (G)and blue(B) output by the image sensor;

FIG. 11 is a block diagram of an automatic exposure processor;

FIG. 12 is a block diagram of a histogram generator;

FIG. 13 is a graph of a histogram of a document image;

FIG. 14 is a block diagram of document size detector;

FIG. 15 is a diagram of a document and signals for document sizedetection;

FIG. 16 is a diagram of a document put on a platen obliquely and DCLR1signal;

FIGS. 17A, 17B and 17C are flowcharts of automatic exposure;

FIG. 18 is a block diagram of a magnification change and move processor;

FIG. 19A is a plan view of a document put on a platen, and FIG. 19B is adiagram of reduction of image;

FIG. 20A is a diagram of read data D₁, D₂, . . . read at 400 dpi, FIG.20B is a diagram of read data D₁, D₂, . . . read at 200 dpi, and FIG.20C is a diagram of image data used after thinning out for a reductionfrom 400 to 200 dpi;

FIG. 21 is a timing chart when image data is processed for a life-sizecopy;

FIG. 22 is a timing chart when image data is processed for amagnification L larger than one;

FIG. 23 is a timing chart when image data is processed for amagnification L smaller than one;

FIGS. 24A and 24B are diagrams illustrating leftward and rightwardmovement of image;

FIG. 25A is a timing chart of signals {overscore (WRST1)}, {overscore(WRST2)}, {overscore (RRST1)} and {overscore (RRST2)} sent to thememories 803 a and 803 b, and FIGS. 25B and 25C are timing charts ofvarious signals D_(in), {overscore (WE1)}, {overscore (WE2)}, {overscore(RE1)}, {overscore (RE2)} and D_(out);

FIG. 26 is a diagram for illustrating image repeat;

FIG. 27 is a timing chart for image repeat;

FIG. 28 is a block diagram of an HVC converter;

FIG. 29 is a flowchart for determining coefficients a₁, a₂ and a₃ usedin HVC conversion;

FIG. 30 is a diagram of color difference signals WR and WB in colorspace;

FIG. 31 is a block diagram of an image quality controller 1103;

FIG. 32 is a diagram of a picture printed in image monitor mode andrelevant control signals in the mode;

FIG. 33 is a diagram for illustrating a relation of color circulation toa value of MA₂₋₀ for changing masking coefficients;

FIG. 34 is a diagram for illustrating a relation cf color circulation toa value of CO₂₋₀ for changing color balance;

FIG. 35 is a diagram for illustrating a color circulation for chromaadjustment;

FIG. 36 is a block diagram of a density converter;

FIG. 37 is a graph of LOG table;

FIG. 38 is a block diagram of a UCR/BP processor;

FIGS. 39A and 39B are diagrams for illustrating undercolor remove andblack painting;

FIG. 40 is a graph of UCR table;

FIG. 41 is a block diagram of a color corrector 1400;

FIG. 42 is a graph of spectral characteristic of green filter;

FIG. 43 is a graph of spectral characteristic of magenta toners;

FIGS. 44A and 44B are block diagrams of a region discriminator;

FIG. 45 is a diagram of a primary differential filter along the mainscan direction;

FIG. 46 is a diagram of a primary differential filter along the subscandirection;

FIG. 47 is a diagram of a secondary differential filter;

FIG. 48A is a graph of lightness distribution of five lines withdifferent size from each other, FIG. 48B is a graph of primarydifferentials for the five lines, and FIG. 48C is a graph of secondarydifferentials for the five lines;

FIG. 49 is a diagram for illustrating an increase in chroma data W dueto phase differences among R, G and B data, and WS obtained bysmoothing;

FIG. 50 is a diagram of a smoothing filter;

FIG. 51 is a graph of a WREF table;

FIG. 52A is a diagram an image consisting of cyan and magenta, FIG. 52Bis a graph of image data of red, green and blue of the image shown inFIG. 52A, and FIG. 52C is a graph of chroma and color difference datafor explaining erroneous detection of black at a boundary between cyanand yellow;

FIG. 53 is a diagram for showing two adjacent pixels along eightdirections with respect to an interest pixel (X) in filters fordetecting white and black dot;

FIG. 54 is a diagram of four steps of reference levels for detectingdots and signals {overscore (AMI)}0-{overscore (AMI)}3;

FIG. 55 is a graph of an MTF table;

FIGS. 56A and 56B are block diagrams of an MTF correction section;

FIG. 57 is a timing chart of pixel clock, image data, driving voltagefor laser diode, limit pulse, and driving voltage with a duty ratio;

FIG. 58 is a diagram of a Laplacian filter;

FIG. 59 is a graph of DMTF table;

FIG. 60 is a diagram of a smoothing filter for smoothing input data of400 dpi to 300 dpi;

FIG. 61 is a diagram of a smoothing filter for smoothing input data of400 dpi to 200 dpi;

FIG. 62 is a diagram of a smoothing filter for smoothing input data of400 dpi to 100 dpi;

FIGS. 63A and 63B are diagrams for explaining a slight extension ofchromatic data outside a character and deletion of such extension;

FIGS. 64A and 64B are diagrams of examples of images in correspondenceto FIGS. 63A and 63B;

FIG. 65A is a diagram of addition of correction data (hatched area) toan edge of an image, and FIG. 65B is a diagram of an amount of tonersbefore correction (solid line) and after correction (dashed line);

FIG. 66 is a block diagram of a printer edge correction section;

FIGS. 67A, 67B and 67C are diagrams of addition of PD₁₇₋₁₀ at a leadingedge, at an intermediate point and at a trailing edge in an image;

FIG. 68 is a block diagram of a gamma correction section;

FIG. 69 is a graph of gamma correction table in brightness control mode;

FIG. 70 is a graph of gamma correction table in contrast control mode;

FIG. 71 is a graph of a relation of VIDEO₇₇₋₇₀ to VIDEO₄₇₋₄₀ for valuesof 1-7 of CO₂₋₀; and

FIG. 72 is a graph of a relation of VIDEO₅₇₋₅₀ to VIDEO₄₇₋₄₀ subtractedby background clearance data UDC7-0 and corrected on slope by GDC₇₋₀.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

Referring now to the drawings, wherein like reference charactersdesignate like or corresponding parts throughout the drawings, anembodiment of the invention is described.

(A) Image Processor

FIG. 1 shows a digital color copying machine comprising an image reader100 reading a document image and an image forming section 200reproducing an image date read by the image reader 100. In the imagereader 100, a scanner comprises a lamp 12 exposing a document, a rodlens array 13 condensing a light reflected from the document, and a CCDcolor image sensor 14 converting the condensed light to electricsignals. The image sensor 14 has three lines of CCD elements arrangedwith a prescribed distance for reading digital image data of componentsof red (R), green (G) and blue (B). When a document image is read, thescanner 10 is driven by a motor 11 to be moved along a subscan direction(shown with an arrow). The scanner reads a while plate 16 for shadingcorrection first and scans the document put on a platen 15. An image ofthe document exposed with the lamp 12 is converted to multi-levelelectric signals of the three colors by the image sensor 14. Aftershading correction and interpolation between lines, a signal processor20 converts the signals of the three colors to 8-bit gradation data ofyellow (Y), magenta (M), cyan (C) and black (BK). The data are furthersubjected to MTF correction, gamma correction and the like. Then, theyare stored in the buffer memory 30 for synchronization.

Next, in the image forming section 200, a printer head 30 converts thegradation data an analog signal to generate a driving signal, and alaser diode in the printer head 30 emits a light according the signal.The laser diode is always emits weak light in order to improve risingresponse on light emission, and the weak light is called as bias light.

The laser beam emitted by the laser diode is reflected by a mirror 37 toexpose a rotating photoconductor drum 41. The drum 31 has been erasedbefore exposure for each copy operation and has been charged uniformlyby a sensitizing charging 43. When the drum 41 is exposed in such astate, an electrostatic latent image of a document is formed on thephotoconductor drum 41. One of four development unit of toners of cyan,magenta, yellow and black is selected to develop the latent image. Atoner image developed is transferred by a transfer charger 46 onto asheet of paper supplied from a cassette 50 on a transfer drum 51.

The above-mentioned printing process are repeated for four colors ofyellow, magenta, cyan and black. The scanner 10 repeats the scanmovement in synchronization with the transfer drum 51. Then, the sheetof paper is separated by a separation claw 47 from the transfer drum 51,passes through a fixing unit 48 for fixing the toner image anddischarged onto a tray 49.

FIG. 2 shows an operational panel 25 of the copying machine. The panel25 has a display unit 71. When a user presses a key 77 for selecting animage monitor, the display unit 26 displays not only a number of copies,a magnification, but also four kinds of image forming conditions ofmasking coefficients, sharpness, gamma curve and color balance. In theimage monitor, eight images are printed on a sheet of paper according toimage-forming conditions displayed in the display unit 71. The keys 74a-74 d are used to select the four kinds of image forming conditions. Akey 75 is used for entering into a serviceman mode, and when the mode isselected, an LED 75 a is turned on. The serviceman mode is used to setcoefficients a₁, a₂, a₃ and a₄ for HVC conversion used in an HVCconverter 1100 which is explained later. A key 76 is used to invert apositive image of a document to a negative image.

(B) Outline of Read Signal Processor

Processings in the read signal processor 20 are explained. First, theyare explained generally, and each processing is explained next indetail.

FIGS. 3A and 3B show blocks in the read signal processor 20. Analogimage data OSR1, OSR2, OSG1, OSG2, OSB1 and OSB2 are sent to ananalog-to-digital (A/D) converter 300. The A/D converter 300 convertsthe input data to 8-bit digital image data R₁₇₋₁₀, G₁₇₋₁₀, B₁₇₋₁₀ of thethree colors and sends it to the shading correction section 400.

The shading correction section 400 corrects scattering of read data dueto scattering of illumination of the lamp 12 and the like to outputcomponents R₂₇₋₂₀, G₂₇₋₂₀ and B₂₇₋₂₀.

The image sensor 14 has three lines of CCD elements spaced by apredetermined distance for reading image data of red (R), green (G) andblue (B) (refer to FIG. 7). Each component of image data of the threecolors is called simply as R data, G data and B data. A correction unit500 for lines of three colors in the image sensor 14 stores the R dataand G data temporarily to delay by a predetermined time with respect tothe B data in correspondence to the distance between the three lines. Inthis embodiment, a number of effective pixels in a line is controlledaccording to magnification of copy. Further, correction for the lines isperformed for correcting a shift of the read data. The corrected dataR₃₇₋₃₀, G₃₇₋₃₀ and B₃₇₋₃₀ are sent to an AE processor 600 and to amagnification change and move processor 800.

The AE processor 600 detects document size and performs automatic colorselection and automatic exposure. In the detection of document size, arange of the existence of a document on a platen 15 is detected along amain scan direction in the unit of line (refer to FIG. 16).

The magnification change and move processor 800 performs deletion ofdata in an unnecessary region, reduction interpolation, magnificationand reduction, image repeat and magnification interpolation on dataR₃₇₋₃₀, G₃₇₋₃₀ and B₃₇₋₃₀. The above-mentioned unnecessary regionincludes a region wherein no document exists on a platen and a regionresulting from reduction of document image, and it is deleted accordingto the detection of document size in the AE processor 600. The reductioninterpolation is performed for a size in correspondence to the reductionratio in order to prevent deterioration of image quality of a reproducedimage. On the other hand, when an image data is magnified, image qualityis deteriorated if the image data is simply inflated. Then, the imagedata is smoothed in correspondence to a magnification. Further, when auser presses a key 77 in the operational panel, a part of a documentimage is output eight times repeatedly on the same sheet of paper.

An image interface 1000 selects either data R₄₇₋₄₀, G₄₇₋₄₀ and B₄₇₋₄₀received from the magnification change and move processor 800, or R, Gand B data, R-VIDEO₇₋₀, G-VIDOE₇₋₀ and B-VIDEO₇₋₀, received from anexternal apparatus 900, and synthesize it. Further it generates timingsignals for sending image data to an RGB interface or a printerinterface.

The HVC converter 1100 generates lightness signal V₇₋₀, color differencesignals WR₇₋₀ and WB₇₋₀ based on RGB data, R₅₇₋₅₀, G₅₇₋₅₀ and B₅₇₋₅₀obtained by reading a color patch with the image sensor 14 and R, G, Bdata stored in a ROM. Further, it generates chroma signal W₇₋₀ and huesignal H₇₋₀. Thus, scatterings of read characteristics of the imagesensor can be corrected.

The HVC converter 1100 includes an image quality controller 1103. Thecontroller 1103 sets image-forming conditions (masking coefficients,sharpness, gamma curve and color balance) for eight images for the imagequality monitor in correspondence to key input of the key 77.

A density converter 1200 converts R, G, B data (R₆₇₋₆₀, G₆₇₋₆₀ andB₆₇₋₆₀) proportional to a quantity of reflection light from a documentto density data DR₂₇₋₂₀, DG₂₇₋₂₀ and DB₂₇₋₂₀. Further, it includes aninverter to convert a positive image of a document to a negative image.Further, a negative/positive inverter 1250 inverts the data DR₂₇₋₂₀,DG₂₇₋₂₀ and DB₂₇₋₂₀ if {overscore (NEGA)} signal is received, otherwiseit passes the as-received data.

A UCR/BP processor 1300 obtains a minimum among the density dataDR₂₇₋₂₀, DG₂₇₋₂₀ and DB₂₇₋₂₀ to take a part of the minimum as a blackdata BK₇₋₀ for painting black toners. On the other hand, quantities oftoners of cyan, magenta and yellow are removed in correspondence to theblack data (undercolor) to supply data, Co₇₋₀, Mo₇₋₀ and Yo₇₋₀.

A color corrector 1400 performs masking operation for adjusting colorreproduction in correspondence to spectral characteristics of colorfilters of the image sensor 14 and the toners of cyan, magenta andyellow (refer to FIGS. 42 and 43).

A region discriminator 1500 discriminates black character areas and dotimage areas in a document image. (In a dot image area, an image iscomposed of dots.) The discrimination of black characters comprisesdetection of a character (edge), detection of black, and detection of aregion which is liable to be detected as black. A character (edge) isdetected with a differential filter. Black is detected based on chroma.In this embodiment, erroneous decision can be prevented by smoothing thechroma data when the R, G and B data shifts slightly due to vibrationsof the image sensor 14 on reading image data. Further, in order toprevent an erroneous decision as a black character on a character with alow lightness and a low chroma, a color background is discriminated.Even when it is decided as a black character, the decision isinvalidated for a region decided to be a color background. Then, a blackcharacter can be decided correctly.

An MTF corrector 1600 performs edge emphasis and smoothing most suitablefor the image data VIDEO₇₋₀ and MVIDEO₇₋₀ received from the colorcorrector 1400 based on the kind of pixels and printing situation. If acopying is operated in a full color standard mode, edges are notemphasized on data of cyan, magenta and black at black edges, and aminimum of the data of cyan, magenta and black is taken as image data.Thus, an undesired extended line of C, Y and Y data can be deleted(refer to FIG. 64A). Further, edges are not emphasized when BK data isprinted in a monochromatic standard mode or photography mode. Then, anedge of a color character is prevented to have a border of black.

Further, a duty ratio of laser emission is changed according to the kindof image recognized by the region discriminator 1500. The duty ratio isdefined as a ratio of laser emission time in a pixel clock cycle. Incase of a pixel in a dot image, the duty ratio is set to be 100% inorder to prevent a Moire pattern. Otherwise the duty ratio is set to besay 80% to reduce noises between lines.

Further, a prescribed value is added to pixel data at edges to correctamounts of excess or deficient toners.

A gamma corrector 1700 performs gamma correction on the image dataVIDEO₄₇₋₄₀ after MTF correction to provide image data having desiredimage quality. A user can select gamma curve change signal GA₂₋₀ withthe key 74 c.

(C) Analog-to-digital Converter

Each section in the read signal processor 20 shown in FIGS. 3A and 3B isexplained in detail. FIG. 4 shows a block diagram of theanalog-to-digital (A/D) converter 300 which converts an input signal to8-bit digital image data. The CCD image sensor 14 receives analog imagedata OSR1, OSR2, OSG1, OSG2, OSB1 and OSB2 in proportion to a quantityof reflection light of the document image and converts them to 8-bitdigital image data R₁₇₋₁₀, G₁₇₋₁₀, B₁₇₋₁₀ of the three colors. Theanalog image data OSR1, OSG1 and OSB1 denote image data of odd pixels,while the analog image data OSR2, OSG2 and OSB2 denote image data ofeven pixels. The analog image data are sent to three A/D conversionsections 307, 308 and 309 for red, green and blue. The three sectionshave the same structure each other, and each section comprisesoptimizing sections for odd pixels and for even pixels having the samestructure each other.

Here, the optimizing section 310 for odd pixels in the section 309 forblue data is explained. A clock signal generator generates various clocksignals. A sample-and-hold circuit 302 samples and holds analog dataOSB2 of even pixels according to a sampling pulse SCLK and a low passfilter and the like remove reset noises thereof. The signal is clampedaccording to {overscore (BKHD)} signal for switching an analog switch inorder to clamp DC level to zero for amplifying the signal by theamplifier 303. Then, a voltage controlled amplifier 303 amplifies thesignal and a clamp circuit 304 adjust it according to clamp pulse{overscore (CLAMP)} to a prescribed DC level which is set according tocontrol voltages VG2B and VC2B from a D/A converter 305.

Image data of odd pixels and even pixels processed by the two optimizingsections 310 and 311 are synthesized as a continuous image data byswitching according to signal OSSEL. The synthesized signal is sentthrough a buffer 312 to an A/D converter element 306 according to asampling clock pulse ADCK.

(D) Shading Correction Unit

FIG. 5 shows the shading correction section 400. The shading correctionsection 400 corrects scattering of read data due to scattering ofillumination of the lamp 12 and the like. First, data of a plurality oflines is read on a uniform white plate 16 along the main scan direction.As to the read data, data of the pixels on the same line along the subscan direction are compared, and a most bright (white) data for eachpixel is taken as a data for shading correction. Then, bad data due todirtiness of the white plate 16 is removed for precise shadingcorrection. Further, in reciprocal conversion on calculating shadingcorrection data, an output data having bits larger than the input datais used for more precise shading correction.

In the block diagram shown in FIG. 5, input data R₁₇₋₁₀, G₁₇₋₁₀ andB₁₇₋₁₀ are received by correction sections 401, 402 and 403 for red,green and blue. That is, shading correction is performed for the imagedata of red, green and blue independently of each other. Thus, mostappropriate shading correction can be performed for each of red, greenand blue. The tree correction sections have the same structure eachother. Then, the section 403 for blue is explained here. First, theinput data B₁₇₋₁₀ is received by a peak hold circuit 404. When inputdata of a first line is received, the circuit 404 stores the as-receivedinput data into the shading memory 405. When input data of a second lineis received, the peak hold circuit 404 reads the data of the first linestored in the shading memory 405 sequentially and compares it with thedata of the second line for each pixel. Then, a brighter data is holdand stores it in the shading memory 405. The image data of the thirdline and the like are processed similarly. Thus, the brightest data foreach pixel is stored in the shading memory 405 to remove bad data due todirts, ink and the like on the white plate 16.

A signal {overscore (SHWR)} is input to the peak hold circuit 404 iskept at H level except when data for correction is read, in order toinhibit data input to the peak hold circuit 404. Then, the data storedin the shading memory 405 is held. On the other hand, when data forcorrection is read, the signal {overscore (SHWR)} is changed to L level,and the above-mentioned processing to store the brightest data isperformed. When the image sensor 14 starts to read a document image, thesignal {overscore (SHWR)} is changed again to H level to keep the datastored in the shading memory 405.

An reciprocal conversion table 400 performs operation of Eq. (1) on the8-bit shading correction data SH₇₋₀ (D_(in)) stored in the shadingmemory 405 to output a 12-bit converted data Q₁₁₋₀ (D_(out)).$\begin{matrix}\begin{matrix}{D_{out} = \quad {255 \cdot {Q/D_{in}}}} & \quad \\{= \quad 1} & {\quad {{{if}\quad D_{in}} \geq 4.}}\end{matrix} & (1)\end{matrix}$

The output data D_(out) is a 12-bit data in order to avoid that theoutput value D_(out) has the same value when the input value D_(in)differs a little. Then, the precision of the shading correction is keptat a certain level. FIG. 6 shows a relation of D_(out) relative toD_(in). If a value of D_(in) is extremely small, for example, if D_(in)is 255·Q/4 or less, a value of D_(out) increases abruptly and causes anerror in shading correction. Then, if D_(out) is 4 or larger, D_(out) isforced to have a value of 1 to invalidate shading correction.

Shading correction is performed by multiplying the data B₁₇₋₁₀ with thereciprocal obtained by the table 406. That is,

B ₂₇₋₂₀ =B ₁₇₋₁₀ ·D _(out) =B ₁₇₋₁₀·255·Q/D _(in).  (2)

FIG. 6 shows the relation of Eq. (2). In other words, the data B₁₇₋₁₀ isnormalized to 255·Q. The value Q is determined for each of red, greenand blue according to spectral distribution of the white plate 16 forcorrecting white balance. This reflects a fact that the white plate 16is not completely white in an actual case. In an embodiment, Qs for red,green and blue are 200/255, 242/255 and 211/255, respectively. The value255 is a coefficient X which determines background level, and thebackground can be changed by changing the value X. In this embodiment,the AE processor 600 changes the background level according to a ratioof monochromatic pixels in an entire document, as will be explainedlater.

(E) Correction Unit for Lines of Three Colors in the Image Sensor

As shown in FIG. 7, the CCD image sensor 14 has three lines of red,green and blue of CCD elements for reading image data with a spacing of80 μm between two lines. In the copying machine of the embodiment, apixel has a width of 10 μm, or the three lines of the CCD elements has aspacing of eight lines. Then, the green component of the image data isread before eight lines than the blue component, and the red componentis read before sixteen lines than the blue component. Actually, a numberpreceding the blue component also depends on the moving velocity alongthe subscan direction of the scanner 10. That is, the number of thelines between two CCD elements multiplied with the magnification Y isthe actual lines preceding the blue component. The correction unit 500stores the R and G data temporarily in memories to delay bypredetermined times with respect to the B data in correspondence to thedistance between the three CCD lines in the image sensor 14. Forexample, if magnification is two, a shift of data between each linebecomes twice, and a capacity of the memories for the correction alsobecomes twice. In this embodiment, it is noted that a maximum size of asheet of paper on which an image is formed is A3, and an effective pixelnumber in a line is controlled according to the magnification by aprocessor 501 for correction of the lines. In concrete, if magnificationis two, a range to be read in a line is restricted by a half. Thus, anincrease in capacity of the memories is suppressed. Further, the data ofthe lines are interpolated by a processor 502 for interpolation tocorrect a shift of the read data.

(E-1) Correction for Lines of Three Colors in the Image Sensor

FIG. 8 shows the processor 501 for correction of shifts between thelines and the processor 502 for interpolation in the correction unit500. Input data R₂₇₋₂₀ and G₂₇₋₂₀ from the shading correction section400 are stored in field memories 503 and 504 having a capacity of 256 Ktimes 8 bits. The input image data are 8-bit data. If a maximum size ofa document read by the CCD image sensor 14 is A4 and the resolution is400 dpi, a data amount is about 5k bits for one line along the main scandirection. Therefore, one field memory has image data of 51 lines. Whenread data is expanded along the subscan direction for printing, eachline of image data of a document is read repeatedly Y times where Ydenotes magnification, to inflating data along the subscan direction Ytimes. As explained above, red data precedes by 16Y lines relative to Bdata, while green data precedes by 8Y lines relative to B data. In orderto correct the shifts, it is required that the field memories 503 and505 can store data of 8Y lines. On the other hand, as explained above,the field memories 503 and 505 only store data of 51 lines, and themagnification can only be enlarged up to 51/8=6.375. A maximum size of asheet of copy paper is determined preliminarily, for example A3. Then,the correction processor 501 limits a range to be read by the imagereader in inverse proportion to magnification X in the main scandirection. Then, an amount of data of one line in the main scandirection is about 5k/X bits, and the field memory 503, 504 can storedata of about 256k/(5k/X)=51X lines. Thus, the correction unit 500increases a maximum magnification without increasing a memory capacity.

FIG. 9 shows a timing chart of control signals and image data. Signal{overscore (TG)} denotes a trigger signal in synchronization with readperiod t of a line along the main scan direction by the image sensor 14.Signal {overscore (FIFOEN)} is output in a read area determinedaccording to magnification along the main scan direction. Signal{overscore (FRES1)} is a write start signal for the field memories 503and 505 with a period T of (INT(8Y)+1). Signal {overscore (FRES2)}denotes a read start signal for the field memories 503 and 505 and has aperiod of T in synchronization with signal {overscore (FRES1)}. Data arestarted to be written in the field memory 503, 505 in synchronization ofa leading edge of signal {overscore (FRES1)}. Then, they are read afterthe period T passes in synchronization with a leading edge of signal{overscore (FRES2)}. The signal {overscore (FRES2)} also serves as awrite start signal for a field memory 504. The field memory 505 writesthe data from the field memory 503 in synchronization of signal{overscore (FRES2)}. Signal {overscore (FRES3 )} precedes by a read timet of by one line with respect to the signals {overscore (FRES1)} and{overscore (FRES2)}, and has a period T. The preceding time of t is forthe interpolation by the processor 502 for synchronizing red and blueimage data to green image data.

(E-2) Interpolation

Next, the processor 502 for interpolation in the correction unit 500 isexplained. The periods T of signals {overscore (FRES1)}, {overscore(FRES2)} and {overscore (FRES3)} are rounded by INT function tosynchronize with signal {overscore (TG)}. Then, the output of data fromthe field memory 503, 505 can be controlled in the unit of t (or aneighth times magnification). The processor 502 corrects the shift of(8Y−INT(8Y)) line which cannot be corrected by the processor 501.

FIG. 10 illustrates shift of the image data of red (R), green (G) andblue (B). In the processor 501, the R data is delayed by 2T−t, and the Gdata is delayed by T. Actually, the image data of R, G and B are shiftedby 8Y lines each other. Owing to a fraction of 8Y, the R data precedesby a1=(8Y−INT(8Y)) line relative to the G line, and the G data precedesby b1=(1−(8Y−INT(8Y))) line relative to the B line.

As shown in FIG. 8, the R data stored in the field memory 504 flowsthrough two paths. The R data along a path is delayed by one line by aline memory 507. If R_(m) denotes a data of M-th line, data R_(m) issent from the field memory 504 to a multiplier 506, while data R_(m+1)is sent to another multiplier 508 from the line memory 507. Themultiplier 506 performs a following operation:

R_(x)·R_(m),  (3)

where R_(x) is a coefficient determined by a following relation:

256:1=R _(x):1−a ₁ =R _(x):1−(8Y−INT(8Y)),

or

 R _(x)=256(1−(8Y−INT(8Y)).  (4)

On the other hand, the other multiplier 508 performs a followingoperation:

(1−R_(x))·R_(m+1),  (5)

Data obtained by the multipliers 506 and 508 are added by an adder 509to supply data R₃₇₋₃₀. Thus, the correction on the fraction ofmultiplication is completed on the R data.

As shown in FIG. 8, the B data B₂₇₋₂₀ received from the shadingcorrection unit 400 also flows through two paths. The R data along apath is delayed by one line by a line memory 511. If B_(m) denotes adata of M-th line, data B_(m) is sent to a multiplier 510, while dataB_(m+1) is sent to another multiplier 512 from the line memory 511. Themultiplier 510 performs a following operation:

(1−B_(x))·B_(m),  (6)

where R_(x) is a coefficient determined by a following relation:

256:1=256−B _(x):1−b ₁=256−B _(x):8Y−INT(8Y),

or

R _(x)=256(1−(8Y−INT(8Y)).  (7)

On the other hand, the other multiplier 512 performs a followingoperation:

B_(x)·B_(m+1),  (8)

Data obtained by the multipliers 510 and 512 are added by an adder 513to supply data B₃₇₋₃₀. Thus, the correction on the fraction ofmultiplication is completed on the B data.

As explained above, the interpolation correction of the R and B data isperformed relative to the G data, and the magnification can be set inthe unit of 1/1024. The data R₃₇₋₃₀, G₃₇₋₃₀ and B₃₇₋₃₀ subjected to theinterpolation correction are sent to the AE processor 600 and to themagnification change and move processor 800.

(F) Automatic Exposure Processor

The automatic exposure (AE) processor 600 detects document size andperforms automatic color selection (ACS) and automatic exposure. FIG. 11shows a block diagram of the automatic exposure processor 600. Theprocessor 600 comprises a histogram generator 602 generates a histogramof monochromatic gradation data in a document image, a document sizedetector 650 detecting a document size, and a line data monitor 700monitoring one line of data of R, B and B image data to detect anomaliesdue to troubles of the lamp 12, the image sensor 14 and the like.

As explained below, the auto color selection is performed to decide ifthe document is a full color document or a monochromatic documentaccording to a ratio of monochromatic pixels in the whole document. Theautomatic exposure determines a background level of a document so thatthe most bright color in the document becomes white (gradation level255). However, if the automatic exposure is performed on a full colordocument, an image reproduced on a sheet of paper seems to fade away asa whole. Then, the automatic exposure is forbidden if the automaticcolor selection decides that the document is a full color document.

(F-1) Histogram

FIG. 12 shows a block diagram of the histogram generator 602. Thehistogram generator 602 generates a histogram of monochromatic gradationdata of 256 gradation level in a document image, and the histogram isused in the automatic exposure processing explained later to decide if aratio of the monochromatic gradation data is large or not.

Thinning out of the pixel data along the main scan direction isperformed by thinning out circuits 603, 604 and 605 for the data R₃₇₋₃₀,G₃₇₋₃₀ and B37-30 of red, green and blue received from the interpolationcorrector 500. The circuits 603, 604 and 605 output a data once insixteen pixels (pixel data) along the main scan direction to SDR pin ofthe histogram memories 606, 607 and 608 for red, green and blue. Thus,the data is thinned out at a ratio of 1/16 along the main scandirection.

Thinning out of pixel data along the subscan direction is performed by acounter 616, a comparator 617 and a NAND gate 619. The counter 616counts trigger signals {overscore (TG)} generated once in the main scan.The comparator 617 outputs a signal when a count of the counter 616equals to signal Vdot₇₋₀ received from a controller 618, and the counter616 is reset when an output signal of the comparator 617 is received asa clear signal {overscore (CLR)}. The NAND gate 619 receivessynchronization signal {overscore (HD)} along the main scan direction,synchronization signal {overscore (VD)} along the subscan direction andthe output signal from the comparator 617. An output of the NAND gate619 is sent to the histogram memories 606-608 as chip select signal{overscore (CS)}. Thus, the data is thinned out at a ratio of 1/Vdot₇₋₀along the subscan direction.

It is decided by a minimum detector 612, a maximum detector 613, anoperator 614 and a comparator 615 if ratio of the monochromaticgradation data in a document image R₃₇₋₃₀, G₃₇₋₃₀ and B₃₇₋₃₀ is large ornot. The decision utilizes a fact that differences between R, G and Bdata are small for monochromatic data. The minimum detector 612 detectsa minimum of data of red (C), green (B) and blue (A) received at thesame time, while the maximum detector 613 detects a maximum of the samedata of red (C), green (B) and blue (A). The operator 614 calculates adifference of the maximum from the minimum. The comparator 615 comparesthe difference with a reference SREF₇₋₀ received from the controller618. If the difference is smaller than the reference, the pixel detectsa monochromatic light, and the comparator 615 sends a signal to{overscore (W)}E pins of the histogram memories 606-608. If thereference SREF₇₋₀ is set to have a somewhat larger value, even if thebackground has a color, the background color can be treated asmonochromatic color on purpose.

The histogram memories 606-608 calculate frequencies of the pixel datadecided to be monochromatic by the comparator 615. For example, afterthe initialization of the CPU 1, signals of L level are input to{overscore (CS)} and {overscore (WE)} pins, the histogram memories 606outputs a frequency RAE₁₅₋₀ of pixel data received at {overscore (ADR)}pin. An adder 609 adds one to the frequency and sends the sum to Din pinof the histogram memory 606. The histogram memories 607 and 608 alsooperate similarly.

As explained above, the histogram generator 602 generates a histogramfor monochromatic data included in a document image. FIG. 13 shows anexample of a histogram. A range A shown in FIG. 13 is not used when theratio of monochromatic pixels is calculated. This is intended to excludeblack data outside a document because a cover having a mirror plane isused to cover a document on a platen.

(F-2) Document Size Detection

FIG. 14 shows the document size detector 650. In the detection ofdocument size by the document size detector 650, a range of theexistence of a document on a platen 15 is detected along a main scandirection in the unit of line (refer to FIG. 15) in a prescan before acopying operation. In this embodiment, a document cover which covers adocument put on the platen has a prescribed color of a uniform densityto detect a boundary of the document. As shown in FIG. 15, a prescan isperformed in an area of A3 in correspondence to the maximum documentsize. The document size SZD₇₋₀ is detected on input image data R₉₇₋₉₀,G₉₇₋₉₀ and B₉₇₋₉₀, and it used to determine a ratio of monochromaticdata in the document by the automatic exposure processing explainedlater.

In the document size detector 650 shown in FIG. 14, multipliers 651multiplies the input image data R₉₇₋₉₀, G₉₇₋₉₀ and B₉₇₋₉₀ with 5, 6 and5, respectively, and an operator 652 adds the products and divided itwith 16. Thus, a signal S₇₋₀ is obtained by mixing the input image dataR₉₇₋₉₀, G₉₇₋₉₀ and B₉₇₋₉₀ with a ratio of 5:6:5. A comparator 653outputs a signal to the NAND gate 654 if the signal S₇₋₀ is smaller thanSREF₇₋₀ received from the controller 618. The NAND gate 654 furtherreceives signal {overscore (HD)} which is output in an area where thedocument can be read. Then, the NAND gate 654 outputs a signal{overscore (SZON)} when the input image data R₉₇₋₉₀, G₉₇₋₉₀ and B₉₇₋₉₀are decided to be pixel data of a document image.

A 13-bit shift register 655 receives the SZON signal extracts it everyfour signals to send four signals Q0, Q4, Q8 and Q12 to a NAND gate 656.When all the four signals have H level, this means that a document areais detected at 16 continuous pixels (about 1 mm). Then, erroneousdetection of document size can be detected. A D-FF 659 receives anoutput signal of the NAND gate 656 and outputs a signal VCLKEN, as shownin a timing chart shown at the bottom in FIG. 15.

At an AND gate, a signal VCLK is enabled by the signal VCLKEN from theD-FF 657 to output signal LASTCK. The signal LASTCK is disabled at atrailing edge of the signal VCLKEN at a last end of the document areaalong the main scan direction so at to latch an address HA_(c-0) inD-FFs 660. A flip flop 664 generates signal FIRSTCK according to thesignal so as to change the output of D-FFs 661 which have been clearedby a trigger signal {overscore (TG)}. That is, the signal FIRSTCK risesat the leading edge of the first LASTCK of a line. Then, the addresslatched in the D-FFs 661 with the signal FIRSTCK becomes the top addressof the document area.

The addresses latched in the D-FFs 660 and 661 are latched again inD-FFs 662 and 663 in correspondence to a signal of H level from an ANDgate 665 generated by a signal {overscore (TG)} so as to generatedocument size address signals LASTSZ_(C-0) and FIRSTSZ_(C-0) to be sentto a selector 667. The CPU 1 disables the signal {overscore (TG)} oncewith signal {overscore (TGSTP)}, and a desired address signal isselected by providing signals SZSEL1 and SZSEL0 to the selector 667.

The selector 667 selects lower eight bits of the address at the last endof a document if SZSEL1=SZSEL0=0, upper five bits thereof if SZSEL0=0and SZSEL1=1, to send it as a document size data SZD₇₋₀ to the CPU 1.Further, the selector 667 selects lower eight bits of the address at thetop end of the document if SZSEL0=1 and SZSEL1=0, upper five bitsthereof if SZSEL0=SZSEL1=1, to send it as a document size data SZD₇₋₀ tothe CPU 1. The CPU 1 repeats the above-mentioned data read to recognizethe document area along the subscan direction.

The document size data SZD₇₋₀ of 0 in a document and 1 outside it iswritten in a bit map memory provided in the CPU 1 by using the top andlast addresses detected along the main scan direction and along thesubscan direction successively. Next, it is decided if points of changefrom 1 to 0 and from 0 to 1 exists as a continuous line along thesubscan direction. If discontinuity is detected, the address of thediscontinuous change is corrected based on previous and following lines.This corrects erroneous detection for example when the document is abook and a center of the book is read as black, or when an edge of adocument is dirty. After the correction, when the copying operation isstarted, the CPU 1 determines an effective document area according tothe bit map data along the main scan direction successively.

The document size data SZD₇₋₀ is sent to the controller 801 in themagnification change and move section 800 explained later. Thecontroller 801 generates signal DCLR1 which is L level in the documentarea and H level outside it according to the document size data SZD₇₋₀in order to mask an area unnecessary for image processing. Then, even ifa document is put obliquely as shown in FIG. 16, the area outside thedocument area can be masked in correspondence to the location of thedocument.

(F-3) Automatic Exposure

Signals {overscore (TGSTP)} and {overscore (SZCS)} are set if the CPU 1is hard to read the signal SZD₇₋₀. Signal {overscore (OE2)} is used as asort signal for the CPU 1. FIGS. 17A, 17B and 17C show a flow ofautomatic exposure of the CPU 1 wherein the coefficient X of thebackground level explained above on the shading correction section 400based on the histogram and the document area determined above. First, aprescan is performed. After the prescan is completed (YES at step S600),a total pixel number outside the document area is determined accordingto the document size determined by the document size detector 650 (stepS601). Next, by multiplying a total pixel number of the maximum documentarea (A3 size) with ratios of thinning out along the main scan directionand along the subscan direction, a total pixel number Tn which can bestored in the histogram memories 606-608 is determined, and a pixelnumber Un outside the area is determined by multiplying the pixel numberoutside the document size detected by the document size detector 650with the ratios of thinning out (step S602). Next, frequencies RSn, GSnand BSn stored in the histogram memories 606-608 is checked and amaximum thereof is determined (step S603). Then, achromatic ratioBKn=(Sn−Un)/(Tn−Un) is determined as a ratio of achromatic data in thedocument image according the values Sn, Un and Tn determined above (stepS604). Because pixel data outside the area is read as black near 0, Unis subtracted from Sn and Tn. If the achromatic ratio BKn is equal to apredetermined threshold level TH1 or lower (NO at step S605), it isdecided that the document is a color document (step S606), and thecoefficient X of the background is set at 255 (step S615). On the otherhand, if it the achromatic ratio is less than the threshold level TH1(YES at step S605), it is decided that the document is a monochromaticdocument, and the histograms are analyzed.

First, frequencies RS(m), GS(m) and BS(m) are read from the histogrammemories 606-608 at gradation level m from 255 to a certain level LV1for each of red, green and blue (step S607). Next, total frequenciesRPn, GPn and BPn are calculated, and a maximum of RPn, GPn and BPn isdetermined. Further, a background ratio WHn=Pn/(Sn−Un) of amonochromatic document is determined (step S608). If the backgroundratio WH2 is equal to a threshold level TH2 or larger (YES at stepS609), gradation levels RX, GX and BX of red, green and blue incorrespondence to maximums appearing first by checking from the toplevel 255 are determined (step S610). If the background coefficients aredetermined for each of red, green and blue, the color balance except thebackground is deteriorated. Then, if there exist all of RX, GX and BX(YES at step S611), a minimum thereof is determined as the ground levelcoefficient X (step S612).

If one of RX, Gx and BX has no maximum (NO at step S611) or if thebackground ratio is less than the predetermined threshold TH2 (NO atstep S609), it is decided that the document has background of 255 orlarger or the document is a photograph document or the like having nobackground (step S614) and sets the coefficient X to be 255 (step S615)Further, even if RX, GX and BX all exist (YES at step S611), thecoefficient X is set to be 255 in the photograph mode (YES at stepS613).

When the standard mode is set (YES at step S616), the automatic exposureprocessing is performed. As explained later, coefficient P is set as 1(step S617). On the other hand, if the exposure level is set manually(NO at step S616), the coefficient P is set according to the level 1-7(step S618) (refer to Table 1), and in this case, X=255.

As explained above on shading correction, the white plate 16 for shadingcorrection is not ideal white, and the spectral distribution thereof isreplaced as RN:GN:BN instead of sensitivity ratio of red, green and blueof the image sensor 14. If WH1 denotes sensitivity of green wavelengthregion of the plate 16 and WH2 denotes a minimum of the dynamic range ofthe density gradation of a copy, Q is calculated for a desired value255/Q of the reciprocal conversion table for shading correction for eachof red, green and blue as follows:

Q _(R) =P·(RN/GN)·10^(WH1-WH2)·(255/X),

Q _(G) =P·1·10^(WH1-WH2)·(255/X),  (9)

and

Q _(B) =P·(BN/GN)·10^(WH1-WH2)·(255/X),

The coefficients are used when the background level is set manually, andthey are set to be one when automatic exposure is performed. When thebackground level is set manually, the value X of the background level isset to be 255. Table 1 shows values of the coefficients P and N forautomatic exposure and for manual setting. The background level setmanually has seven steps. The level has a center at level 4, and as thelevel departs from 4 toward 1, the background is canceled more, while asthe level departs from 4 toward 7, the background or fog becomesnoticeable more.

TABLE 1 Setting of coefficients P and X AE processing (standard mode)Manual setting P = 1 7 P = 13/16, X = 255 (X is decided 6 P = 7/8, X =255 according to 5 P = 15.16, X = 255 histogram) 4 P = 1, X = 255 3 P =17/16, X = 255 2 P = 9/8, X = 255 1 P = 19/16, X = 255

Conversion data are downloaded in the reciprocal conversion table 406for each of red, green and blue by using the coefficients Q_(R), Q_(G)and Q_(B) determined above (step S620). In the above-mentioned AEprocessing, the background of a document can be processes suitably sothat color balance of a copy is not different from that of the documenteven for a document of photograph or a color image.

In the above-mentioned automatic exposure processing, shading correctionis adjusted suitably by changing coefficients X and P. However, theadjustment is not limited to this method. For example, backgroundclearance level UDC₇₋₀ and slope correction value GDC₇₋₀ used in thegamma correction section 1700 shown in FIG. 69 may be changed. In thiscase, the background clearance level UDC₇₋₀ and the slope correctionvalue GDC₇₋₀ are determined according to a following LOG correctionformula:

UDC ₇₋₀=−(255/DMAX)·log(X/255),  (10)

and

GDC ₇₋₀=(255/(255−UDC ₇₋₀))·128.

A desired value 255·Q of shading correction is set with X=255.

In another way, a ratio of achromatic color in a document obtained inthe analyses of the histogram data means if the document is a colordocument or a monochromatic color, and it can be used to discriminate adocument for the automatic color selection as a full color copyingmachine. If the document is a monochromatic document, printing may beperformed only with black toners. Then, an amount of toners is reduced,and printing can be performed at a fast speed.

Further, even if the background of a document has a color, thebackground may be clear if desired. This is possible by setting thelevel of SREF₇₋₀ somewhat larger so as to enlarge a range of achromaticcolor, and the histograms of the R, G and B data are obtained in theenlarged range. In this case, it is not needed to obtain the ratio ofachromatic color, and the background level X is obtained by analyzingthe histograms.

Instead of detecting the largest maximum from the histograms, an averagegradation level, the maximum and the minimum of the data are obtained,and the coefficient X may be determined according to an averagelightness and the gradation dynamic range determined therefrom.

(G) Magnification Change and Image Move Processor

FIG. 18 shows the magnification change and image move processor 800which performs various processings on data R₃₇₋₃₀, G₃₇₋₃₀ and B₇₋₃₀including erasion of data on an unnecessary region, reduction withinterpolation, output of image data, image repeat and enlargement ofimage with interpolation. The above-mentioned unnecessary regionsinclude a region wherein no document exists on a platen and a regionresulting from reduction of document image, and they are erasedaccording to the detection of document size in the AE processor 600. Asto the reduction with interpolation, for example, when a image read at400 dpi (dots per inch) by the image sensor 14 if a document is desiredto be reduced to 50%, an image reader of 200 dpi has to read an imageinstead that of 400 dpi, and the read data has to be printed at adensity of 400 dpi. However, practically, image data is read with theimage reader of 400 dpi, and the read data are thinned out by a half andthe remaining data are printed at the density of 400 dpi. In this case,data of a narrow line, a point or the like may vanish, and thisdeteriorate image quality. Then, reduction with interpolation isperformed for a size in correspondence to a reduction ratio in order toprevent deterioration of image quality of a reproduced image. On theother hand, when an image data is enlarged, image quality isdeteriorated if the image data is simply inflated. Then, the image datais smoothed in correspondence to a magnification.

(G-1) Erasion of Data in an Unnecessary Region

First, the erasion of data in an unnecessary region is explained. In themagnification change and move processor 800 shown in FIG. 18, a firsterase section 805 for outside regions clears image data in anunnecessary region from the input image data Din (R₃₇₋₃₀, G₃₇₋₃₀ andB₃₇₋₃₀). The unnecessary region mentioned here means a region on aplaten except a document, as shown as a hatched area in FIG. 19A. Theread data in the unnecessary region are black data, and they deterioratecopy quality. The read data in the unnecessary region is erased orcleared according to a DCLR1 signal received from a controller 801. TheDCLR1 signal depends on {overscore (TG)} signal as a horizontalsynchronization signal and VCLK signal as a synchronization signal forimage data. The controller 801 detects an end of image data from theVCLK signal. Then, it makes the first erase section 805 clear the dataread based on {overscore (TG)} signal until a next VCLK signal becausethey are decided to be data in the unnecessary region.

(G-2) Interpolation for Reduction

Next, a interpolation section 802 for reduction performs interpolationon a pixel data received sequentially by using pixel data before andafter the pixel data. The interpolation for reduction meansinterpolation to reduce defects on reduction according to a reasonexplained below, and it is performed by the interpolation section 802. Adocument image is generally reduced by thinning out the image data. Inan apparatus where image data is read at say 400 dpi for a life-sizecopy (FIG. 20A), when the document image is reduced to a half size, itis desirable that the document image is read at 200 dpi (FIG. 20B) andthat the image data is printed at 400 dpi. The image data are thinnedout every other data. However, practically, as shown in FIG. 20C, a partof the image data read at 400 dpi is taken out for printing to change aresolution. However, this simple thinning-out deteriorates theresolution of the image. If the document image comprises a dot image, aMoire pattern may happen if the reduction ratio becomes large. Further,for a monochromatic bi-level image, a probability of monochromaticpixels is rarely as large as 50%, and white pixels dominate usually. Insuch a case, the simple thinning-out may causes defects in a reproducedimage. In order to reduce the bad image quality due to the defects ofdata, the interpolation section 802 performs interpolation on the pixelunder interest (or interest pixel) with adjacent pixels beforereduction. The interpolation section 806 comprises a memory 806 forstoring three successive pixel data and an operator 807 which performs aprescribed interpolation or correction of the n-th pixel data accordingto Eq. (11), and it is performed on three successive pixel data X(n−1),X(n) and X(n+1) of (n−1)-th, n-th and (n+1)-th pixels:

W(n)=a·X(n)+(1−a)·(X(n−1)+X(n+1))/2,  (11)

where W(n) denotes an image data of the n-th pixel obtained by theinterpolation, a coefficient “a” denotes a magnification along the mainscan direction, and X(n−1), X(n) and X(n+1) denote data of the (n−1)-th,n-th and (n+1)-th pixels. In this embodiment, a≧1/3, and if a<1/3, a isrounded as 1/3 or 0.33. In order to meet a situation where a<1/3, acapacity of the memory 806 is enlarged to store five pixel data, thatis, data of (n−2)-th, (n−1)-th, n-th, (n+1)-th and (n+2)-th pixels. Theinterpolation is performed on the five pixel data according to followingEq. (11′):

W=n, (if a≧1.00)

W=a·X(n)+(1−a)·(X(n−1)+X(n+1))/2, (if 1.00>a≧0.33)  (11′)

W=a(X(n−1)+X(n)+X(n−1))+((1-3a)/4)·(X(n−2)+X(n+2)), (if 0.33>a≧0.20)

and

 W=(X(n−2)+X(n−1)+X(n)+X(n+1)+X(n+2))/5, (if 0.20>a)

where X(n−2) and X(n+2) denote data of the (n−2)-th and (n+2)-th pixels.As explained above, if the memory 806 is provided for the matrix size offive pixels, the interpolation is possible for the coefficient “a” of0.2 or more.

(G-3) Magnification Change and Image Move

The pixel data after the above-mentioned interpolation are stored in amemory 803 a or 803 b according to control signals received from thecontroller 801. The control signals include write clock signal WCK andread clock signal RCK both depending on magnification, write enablesignals {overscore (WE1)} and {overscore (WE2)}, read enable signals{overscore (RE1)} and {overscore (RE2)}, write address reset signals{overscore (WRSR1)} and {overscore (WRST2)} and read reset signals{overscore (RRST1)} and {overscore (RRST2)} for the two memoriesrepresented as “1” and “2”. The controller 801 sends an enable signal{overscore (WE1)} or {overscore (WE2)} to one of the memories 803 a and803 b for writing data thereto, while it sends a read enable signal{overscore (RE1)} or {overscore (RE2)} to the other of the memories forreading data therefrom. The magnification can be changed by controllingthe period of the WCK/RCK signals and the duty ratio of pulses. Further,by changing the phase of the write enable signals {overscore (WE1)} and{overscore (WE2)}, read enable signals {overscore (RE1)} and {overscore(RE2)}, the image can be moved. The write address reset signals{overscore (WRSR)}1 and {overscore (WRST2)} and read reset signals{overscore (RRST1)} and {overscore (RRST2)} are output at the start ofwrite and read of data, for controlling the positions of eight images inthe image monitor mode.

The magnification change and the image move by using the memories 803 aand 803 b are explained further in detail. FIGS. 21-23 show timingcharts of input data D_(in), clock signals WCK and RCK and output dataD_(out). In a case shown in FIG. 21 for a life-size reproduction, theclock signals WCK and RCK are set to have the same period “tc” and dutyratio. As to the first memory 803 a, while {overscore (WE1)} signal islow, an image data D_(in) is written in synchronization with the leadingedges of write clock signals WCK. When {overscore (RE1)} signal ischanged to low, the image data stored in the memory 803 a is readsequentially at the leading edges of read clock signals RCK. The writeand read operations are performed similarly as to the second memory 803b. As explained before, when one of the memories 803 a and 803 b isallowed to write data thereto, the other of the memories is allowed onlyto reading data therefrom.

In a case shown in FIG. 22 for a reproduction with a magnification Llarger than 1 (the magnification L is 2 in the case shown in FIG. 22),the write clock signals WCK have a period “tc” and a duty ratio “d”. Onthe other hand, the read clock signals RCK have a period tc·X and a dutyratio d/X. As to the first memory 803 a, while {overscore (WE1)} signalis low, an image data D_(in) is written in synchronization with theleading edges of write clock signals WCK. When {overscore (RE1)} signalis changed to low, the image data stored in the memory 803 a is readsequentially at the leading edges of read clock signals RCK. The writeand read operations are performed similarly as to the second memory 803b. As explained before, when one of the memories 803 a and 803 b isallowed to write data thereto, the other of the memories is allowed onlyto reading data therefrom. The processes of write to and read from thememories 803 a and 803 b are similar to the case shown in FIG. 21.However, the period of the read clock signals RCK is multiplied with X,and this means that the output data D_(out) are extended in time by Ltimes along the main scan direction. The value of L may have a fractionbecause the read timing is simply expanded in proportion to X.

In a case shown in FIG. 23 for a reproduction with a magnification Lsmaller than 1 (the magnification L is ½ in the case shown in FIG. 23),the write clock signals WCK have a period tc·L and a duty ratio d/Lwhile the read clock signals RCK have a period tc and a duty ratio d.The processes of write to and read from the memories 803 a and 803 b aresimilar to the case shown in FIG. 21. However, the period of the writeclock signals WCK is multiplied with L, and this means that the inputdata D_(in) are thinned out in time by L times along the main scandirection. That is, the input data is read every other image data, asshown in the timing chart. Then, by reading the data with RCK signalshaving the same period tc and duty ratio as the life-size reproduction,data D_(out) reduced by half along the main scan direction is output.

Next, image move is explained. The controller 801 moves output image bycontrolling the phase of the signals {overscore (WE1)}, {overscore(WE2)}, {overscore (RE1)} and {overscore (RE2)}. The image move meansthat a document image is moved left or right in a sheet of paper, asshown in FIGS. 24A and 24B. FIG. 25A shows waveforms of signals{overscore (WRST1)}, {overscore (WRST2)}, {overscore (RRST1)} and{overscore (RRST2)} sent to the memories 803 a and 803 b. FIGS. 25B and25C show various signals Din, {overscore (WE1)}, {overscore (WE2)},{overscore (RE1)}, {overscore (RE)}2 and D_(out) output insynchronization with the waveforms shown in FIG. 25A.

In order to move the data rightward, a timing to switch {overscore(RE1)} and {overscore (RE2)} to L level is delayed, as shown in FIG.25B. Then, a timing to read a data from the memories is delayed. Thus, adocument image formed on a sheet of paper is moved right as a whole.

Similarly, in order to move the data leftward, a timing to switch{overscore (WE1)} and {overscore (WE2)} to L level is delayed, as shownin FIG. 25C. Then, a line data is written to the memories from the topaddress, and the data written is read with a normal timing. Thus, adocument image formed on a sheet of paper is moved left as a whole.

The image move of the document image upward and downward can beperformed by adjusting the start timing of the reading of the imagesensor 14, and the start timing of development. However, detailedexplanation of this principle is omitted here.

Next, image repeat is explained. The controller 801 performs imagerepeat by controlling signal {overscore (WRST1)}, {overscore (WRST2)},{overscore (RRST1)} and {overscore (RRST2)}. As shown in FIG. 26, in theimage repeat, a document image is output repeatedly on a sheet of paper.For example, when the same image data is output twice at equal distancesin a one line along the main scan direction, signals {overscore (RRST1)}and {overscore (RRST2)} are output at the start and at the midpoint ofthe line, as shown in FIG. 27. The memories 803 a and 803 b supply thestored data from the first address according to the signals {overscore(RRST1)} and {overscore (RRST2)}. Thus, the same data are outputrepeatedly on a line. This is repeated for each line. In thisembodiment, when a user presses the key 88, a part of the document imageis output eight times repeatedly.

A second erase section 808 for outside regions clears image data orchanged to white data in an unnecessary region from the output imagedata D_(out). The unnecessary region mentioned here means a regionresulting from reduction of document image. For example, as shown inFIG. 19B, a document of A3 size is reduced to A4 size, an unnecessaryregion expressed with a hatching results, and it is represented aswhite. Thus, the unnecessary region is prevented to be painted withblack.

(G-4) Interpolation for Enlargement

A interpolation section 804 for enlargement performs interpolation ofdata from the second erase section 808 according to the magnification inorder to prevent image deterioration when the image is enlarged simplyby the controller 1. The data from the second erase section 808 issupplied to eight smoothing filters 809-816 having appropriate weightson a pixel under interst and adjacent pixels as shown in FIG. 18according to the magnification. The filters 809-816 corresponds tomagnifications of 1, 2, . . . , 8 successively. For example, the filter809 for the magnification of 1 only processes the pixel under interestand the weight is set as 1. That is, the smoothing filter 809 outputsthe as-received data. A magnification detector 817 detects an integralpart of the magnification L along the main scan direction based on theperiod of read clock signals RCK and the duty ratio for the memories 803a and 803 b, and the obtained value S₂₋₀ of the magnification is sent toa selector 818. Then, the selector 818 outputs a data Dout (R₄₇₋₄₀,G₄₇₋₄₀ and B₄₇₋₄₀) from the smoothing filter in correspondence to themagnification.

(H) Image Interface

The image interface 1000 selects either the data R₄₇₋₄₀, G₄₇₋₄₀ andB₄₇₋₄₀ received from selector 818 in the magnification change and imagemove processor 800, or R, G and B data, R-VIDEO₇₋₀, G-VIDOE₇₋₀ andB-VIDEO₇₋₀, received from an external apparatus 900, and synthesize it.Further, it generates timing signals for sending image data to an RGBinterface or a printer interface.

(I) HVC Converter

FIG. 28 shows the HVC converter 1100. As explained briefly before, theHVC converter 1100 generates lightness signal V₇₋₀ color differencesignals WR₈₋₀ and WB₇₋₀ based on the R, G, B data, R₅₇₋₅₀, G₅₇₋₅₀ andB₅₇₋₅₀ obtained by reading a color patch with the image sensor 14 andthe R, G, B data stored in a ROM. A color patch is a color pattern witha uniform density. Further, it generates chroma signal W₇₋₀ and huesignal H₇₋₀. Thus, scatterings of read characteristics of the imagesensor can be corrected.

(I-1) HVC Conversion

First, HVC conversion is explained. An operator 1101 receives input dataR, G and B and operates the conversion shown in Eq. (12) to outputlightness signal V₇₋₀ and color difference signals WR₇₋₀ and WB₇₋₀.

V=a ₁ ·R+a ₂ ·G+a ₃ ·B,  (12)

where a₁+a₂+a₃=1,

WR=(R−V)/(1−a ₁),

and

WB=(B−V)/(1−a ₃).

Coefficients a₁ and a₂ are usually set to be about 0.3 and 0.1 for ausual RGB image data of television. This means that a mixing ratio ofred:green:blue=3:6:1 though the coefficients are changed a littleaccording to characteristics of the image sensor and the colorcharacteristics of lenses in a reduction optical system. For example, asto the image sensor 14 of the embodiment, a₁=0.35 and a₂=0.55.

The coefficients are determined according to a flow shown in FIG. 29.When a key 75 is pressed by a user to set a serviceman mode (YES at stepS1100), a color patch is put on a platen 15. Then, when a print key 73is pressed or when an LED 75 a is turned off (YES at step S1110), theLED 75 a is turned on and the color patch is red (step S1111). Then, astandard value stored beforehand is read to read a value of lightness V(step S1112). Then, coefficients a₁, a₂ and a₃ are determined accordingto the RGB data and the lightness V with the least square method (stepS1113). When the key 75 is pressed again by a user to set a servicemanmode (YES at step S1114), the LED 75 a is turned off and the flowreturns to the normal mode (step S1115).

As shown in FIG. 30, the color difference signals WR₇₋₀ and WB₇₋₀ arerepresented as diagonal axes in a hue plane in color space. The chromasignal W₇₋₀ is calculated by an operator 1102 receiving the colordifference signals WR and WB according to following Eq. (13):

 W=(WR ² +WB ²)^(1/2).  (13)

Because the conversion coefficients a₁ and a₂ are determined by the readdata of the patch, errors of the HVC conversion due to readcharacteristics of the image sensor 14 can be removed.

(I-2) Image Monitor

Further, the HVC converter 1100 includes an image quality controller1103. The controller 1103 sets image-forming conditions (maskingcoefficients, sharpness, gamma curve and color balance) for eight imagesfor the image quality monitor in correspondence to key input of the key77.

FIG. 31 shows an image quality controller 1103 in the HVC converter 1100for image monitor. In a full color copying machine, it is difficult tofind what conditions a desired image is formed in. Then, the imagemonitor mode is provided in this embodiment. When a user presses the key77 in the operational panel 25, as shown in FIG. 32, eight images of apart of a document image are formed on a sheet of paper under variousimage forming conditions of masking coefficients, sharpness, gamma curveand color balance. The magnification change and move processor 800performs image repeat explained above eight times to form the eightimages. Then, a user can select a desired image quality and enters anumber in correspondence therewith on the operational panel 25. Theimage quality controller 1103 sends the selected image formingconditions to the printer section.

The image quality controller 1103 for the image monitor is explained indetail. A counter 1104 is reset by a line trigger signal {overscore(TG)} along the main scan direction and starts counting insynchronization with VCLK signal. A count of the counter 1404 is sent toP inputs of the comparators 1105, 1106, 1107 and 1108, while XE_(c-0),XF_(c-0), XG_(c-0) and 0 are sent to Q inputs thereof. The values ofXE_(c-0), XF_(c-0), XG_(c-0) represent count values along the main scandirection in correspondence to repeat points of image repeat performedby the magnification change and remove processor 800 (refer to a lowerpart in FIG. 32). Each comparator 1105-1108 outputs L level when thecount received from the counter 1104 agrees with the value at Q input. ANOR gate 1109 receives the outputs of the comparators, and if a signalis received from one of the comparators, it sends a counter pulse (CP)signal through a delay circuit 1110 to a monitor area counter 1111. Themonitor area counter 1111 counts the CP pulses and outputs NUM₂₋₀ signalto selectors 1114, 1117, 1120 and 1123. Signal LC₂₋₀ specified adiscrimination number of an image to be repeated for the monitor areacounter 1111, and a countdown signal {overscore (U)}/D sets countdown orcountup.

The discrimination number is changed along the main scan directionaccording to standard values (XE_(c-0), XF_(c-0) and XG_(c-0), 0)supplied to the comparators 1105-1108 generating the CP pulses, whileaccording to the countdown signal and LD₂₋₀ supplied to the monitor areacounter 1111. For example, as shown in FIG. 32, if LD₂₋₀ is 5, thediscrimination number has an initial number of 5. If countdown is set bythe countdown signal, the monitor area counter 1111 outputs 4 for thefirst CP pulse as NUM₂₋₀. Thus, the counter 1111 supplies NUM₂₋₀ of 4,3, 2, 1 successively whenever a CP signal is received. Insynchronization with start of the output of the second image along thesubscan direction, the countdown signal is changed to countdown. Then,if LD₂₋₀ is set at 3, the monitor area counter 1111 supplies NUM₂₋₀ of4, 5, 6, 7 successively whenever a CP signal is received. The counter1111 supplied NUM₂₋₀ to the selectors 1114, 1117, 1120 and 1123 at Ainput. On the other hand, the selectors receive selection signals MSEL0,MSEL1, MSEL2 and MSEL3 at B input. Usually, the selection signals have Hlevel, and the selectors selects the B inputs to supply fixed inputvalues of M₂₋₀, S₂₋₀, G₂₋₀ and C₂₋₀ as MA₂₋₀, SH₂₋₀, GA₂₋₀ and CO₂₋₀.

When a user presses the key 74 a for setting a masking coefficient inthe operational panel, MSEL0 is changed to L level, so that NUM₂₋₀ sentto the A input of the selector 1114 is output as MA₂₋₀. In other words,four images having masking coefficients in correspondence to changesignal MA₂₋₀ changing successively as 4, 3, 2 and 1 are repeated on asheet of paper, and four images having masking coefficients incorrespondence to change signal MA₂₋₀ changing successively as 4, 5, 6and 7 are repeated on the sheet of paper. Then, if a discriminationnumber of 6 is input by a user, the fixed value M₂₋₀ is changed to 6.The selectors 1117, 1120 and 1123 except the selector 1114 supply thefixed values S₂₋₀, G₂₋₀ and C₂₋₀.

When a user presses the key 74 b for setting a sharpness in theoperational panel, MSEL1 is changed to L level, so that NUM₂₋₀ sent tothe A input of the selector 1117 is output as SH₂₋₀. In other words,four images having sharpness in correspondence to change signal SH₂₋₀changing successively as 4, 3, 2 and 1 are repeated on a sheet of paper,and four images having sharpness in correspondence to change signalSH₂₋₀ changing successively as 4, 5, 6 and 7 are repeated on the sheetof paper. Then, if a discrimination number of 2 is input by a user, thefixed value S₂₋₀ is changed to 2. The selectors 1114, 1120 and 1123except the selector 1117 supply the fixed values M₂₋₀, G₂₋₀ and C₂₋₀.

Similarly, when a user presses the key 74 c or 74 d for setting a gammacurve or color balance in the operational panel, MSEL2 or MSEL3 ischanged to-L level, so that NUM₂₋₀ sent to the A input of the selector1120 or 1123 is output as GA₂₋₀ or CO₂₋₀. In other words, four imageshaving a gamma curve or color balance in correspondence to change signalGA₂₋₀ or CO₂₋₀ changing successively as 4, 3, 2 and 1 are repeated on asheet of paper, and four images having a gamma curve or color balance incorrespondence to change signal GA₂₋₀ or CO₂₋₀ changing successively as4, 5, 6 and 7 are repeated on the sheet of paper. Then, if adiscrimination number is input by a user, the fixed value G₂₋₀ or C₂₋₀is changed to the input value.

Next, the contents of the four kinds of image control change signals areexplained. The change signal MA₂₋₀ changes masking coefficients toadjust colors in a copy. Masking coefficients are determined so thatcolor difference does not exist between the document and a copy. Asshown in FIG. 36, other six kinds of masking coefficients (MA₂₋₀=3, 2,1, 5, 6, 7) are set with the above-mentioned masking coefficients(MA₂₋₀=4). Table 2 shows MA₂₋₀ and the masking coefficients.

TABLE 2 Masking coefficients MA²⁻⁰ Masking coefficients 0 sepia color(SEPIA = L) 1 rotate along clockwise 2 direction 3 4 color reproductionagrees with original document 5 rotate along counterclock- 6 wisedirection 7

Usually, masking coefficients to produce a color of 5R is set so thatthe color of a copy is 5R for MA₂₋₀=4. As the change signal decreases to3, 2 and 1, the masking coefficients are set to reproduce a color to aside of 5Y (clockwise) (so as to rotate the color circulation diagram)On the other hand, as the change signal increases to 5, 6 and 7, themasking coefficients are set to reproduce a color to a side of SRP(counterclockwise). Further, when MA₂₋₀=0, masking coefficients forsepia are selected.

Change signal SH₂₋₀ adjusts sharpness of an image. The sharpness iscontrolled by changing edge emphasis coefficient and smoothing filtersize explained later on the MTF corrector 1600. Table 3 shows a relationof SH₂₋₀ to edge emphasis coefficient ED₇₋₀ and smoothing filter sizeSD₇₋₀.

TABLE 3 Sharpness change signal edge emphasis smoothing coefficientfilter SH²⁻⁰ (ED₇₋₀₎ size 1 large no smoothing 2 ↑ 3 ↓ 4 small 5smoothing filter 3 6 smoothing filter 2 7 smoothing filter 1

As shown above, when SH₂₋₀ becomes 4 or less, an edge emphasiscoefficient change block selects a larger edge emphasis coefficientED₇₋₀. On the other hand, when SH₂₋₀ becomes less than 4, the blockselects data with no smoothing as SD₇₋₀, and ED₇₋₀ is decreased andsmoothing filter size is increased. The first smoothing filter forSH₂₋₀=7 has the largest size. Thus, as SH₂₋₀ decreases, the imagebecomes sharper, while as SH₂₋₀ increases, the image becomes smoother.

Gamma curve change signal GA₂₋₀ selects a gamma curve. As will beexplained on the gamma corrector 1700 later, brightness and the contrastare controlled by gradation tables shown in FIGS. 69 and 70. When GA₂₋₀is 4, the brightness and the contrast are adjusted to be the samebetween the original document and a copy thereof. In the adjustment ofbrightness, a shadow type curve is selected as GA increases, while ahighlight type curve is selected as GA decreases. In the adjustment ofcontrast, as GA increases, a highlight and shadow type is selected,while as GA decreases, a halftone emphasis type is selected.

Change signal CO₂₋₀ selects three kinds of color balance, chroma ofimage and copy density. The control of color balance includes C-Rcontrol, M-G control and Y-B control. In an example of C-R control, asCO₂₋₀ increases than 4, the slope correction level GDC₇₋₀ is changed tobe larger than 128 (slope=1) for development with cyan toners and to besmaller than 128 for development with magenta and yellow toners toemphasize cyan density. On the other hand, as CO₂₋₀ decreases than 4,the cyan density is increased than magenta and yellow densities, toemphasize red density. Similarly, in the M-G and Y-B controls, GDC₇₋₀ isadjusted as shown in Table 4. In the C-R control, if an amount of cyantoners is increased by Δ, amounts of magenta and yellow toners aredecreased by Δ/2, so that a total amount of toners per unit area is notchanged.

As shown in Table 4, when CO₂₋₀ is 4, GDC₇₋₀=128 for any developmentprocess including black development. This adjustment controls colorcirculation, as shown in FIG. 34.

As to chroma adjustment, when CO₂₋₀ increases above 4, GDC₇₋₀ isdecreased more than 128 for development of cyan, magenta and yellowtoners and increased less than 128 for development of black. Thus, thedensity of chromatic components (C, M, Y) is weakened, while that ofachromatic component (Bk) is enhanced. When CO₂₋₀ increases above 4,reverse processing is performed. This adjustment controls colorcirculation as shown in FIG. 35. It is important in color balancecontrol that the total density per unit area is not changed. If itchanges, the total density of the document changes, and the fixingtemperature and the like also change. The background level UDC₇₋₀ iskept the same. The copy density control is performed irrespective ofdevelopment processes of cyan, magenta, yellow and black. When CO₂₋₀ islarger than 4, the copy density becomes thicker, and when CO₂₋₀ issmaller than 4, the copy density becomes thinner.

TABLE 4 Image control C-R control M-G control Y-B control chromaticitycontrol CO C M Y BK C M Y BK C M Y BK C M Y BK 7 +48 −24 −24 ±0 cyan −24+48 −24 ±0 ma- −24 −24 +48 ±0 yel- −24 −24 −24 +48 achro- 6 +32 −16 −16±0 −16 +32 −16 ±0 genta −16 −16 ±32 +0 low −16 −16 −16 +32 matic 5 +16−8 −8 ±0 −8 +16 −8 ±0 −8 −8 +16 ±0 −8 −8 −8 +16 4 128 128 128 128 128128 128 128 128 128 128 128 128 128 128 128 3 −16 +8 +8 ±0 +8 −16 +8 ±0+8 +8 −16 ±0 +8 +8 +8 −16 2 −32 +16 +16 ±0 +16 −32 +16 ±0 +16 +8 −32 ±0+16 +16 +16 −32 1 +48 +24 +24 ±0 red +24 +48 +24 ±0 green +24 +24 −48 ±0blue +24 +24 +24 −48 cro- matic

(J) Density Corrector

FIG. 36 shows the density corrector 1200 which converts R₆₇₋₆₀, G₆₇₋₆₀and B₆₇₋₆₀ data proportional to a quantity of reflected light from adocument to density data DR₁₇₋₁₀, DG₁₇₋₁₀ and DB₁₇₋₁₀. The input dataR₆₇₋₆₀, G₆₇₋₆₀ and B₆₇₋₆₀ are received by LOG tables 1201, 1202 and1203. The LOG tables are the same each other shown in FIG. 37. Then,density data DR₁₇₋₁₀, DG₁₇₋₁₀ and DB₁₇₋₁₀ are output according to Eq.(14).

DR=−(255/DMAX)·log(R/255),

DR=−(255/DMAX)·log(G/255),  (14)

and

DR=−(255/DMAX)·log(B/255),

wherein DMAX denotes a maximum reflected density.

Further, the input data R67-60, G₆₇₋₆₀ and B₆₇₋₆₀ are multiplied with5/16, 6/16 and 5/16 or weighted by 5:6:5 by a weight operator 1204,mixed by an adder 1205, and is supplied to another LOG table 1206. Theoutput signal DV₁₇₋₁₀ represents a density level for a monochromaticdocument.

A negative/positive inverter 1250 inverts the density data DR₁₇₋₁₀,DG₁₇₋₁₀, DB₁₇₋₁₀ and DV₁₇₋₁₀ when {overscore (NEGA)} signal is L level,otherwise it passes them without inversion. The {overscore (NEGA)}signal is set with the key 76 in the operational panel 25. In a normalcopy, it is set at H level.

(K) Undercolor-remove/black-paint Processor

FIG. 38 shows the UCR/BP processor 1300. In the reproduction of a fullcolor document, black toners are used because sharp black is hard to beformed by mixing cyan, magenta and yellow toners. IN this embodiment,reproducibility of black is improved by a combination of subtractivecolor mixture of cyan, magenta and yellow and black painting of blacktoner. The UCR/BP processor 1300 calculates a minimum among the densitydata DR₇₋₀, DG₇₋₀ and DB₇₋₀ to take a part of the minimum as a blackdata BK₇₋₀ for painting black toners (BP processing). On the other hand,quantities of toners of cyan, magenta and yellow are removed incorrespondence to the black data (undercolor) to supply data, Co₇₋₀,Mo₇₋₀ and Yo₇₋₀ (UCR processing).

First, a minimum detector 1301 receives the density data DR₇₋₀, DG₇₋₀and DB₇₋₀ to detect a minimum thereof, as shown in FIG. 39A. Adifference circuit 1302 subtracts the background level X sent from theCPU 1 from the minimum, as shown in FIG. 39B. In the undercolor removeprocessing, the value X is zero.

A UCR table 1303 receives CHROMA signal W₇₋₀ from the HVC converter 1100and signal {overscore (CMY)}/K which becomes H level when black isprinted. The UCR table 1303 outputs UCR coefficient α(W) for UCRprocessing and BP coefficient β(W) for BP processing. FIG. 40 shows theUCR table 1303. If the read image is achromatic, it is better toreproduce an image only with black toners because an amount of toners issmall and black becomes sharp. Therefore, if the chroma signal W₇₋₀ issmall, an amount of black and an amount subtracted from the three colordata are increased. On the other hand, if the read color has a color, orif the chroma signal W₇₋₀ is large, an amount of black and an amountsubtracted from the three color data are decreased in order to preventthat the reproduced color becomes impure. Thus, suitable UCR/BPprocessings are performed by changing α(W) and β(W) according to thechroma signal W₇₋₀.

An operator 1304 receives α(W) and β(W) from the UCR table 1303 andoutputs a UCR quantity (displayed as a dashed line in FIG. 39B) on UCRprocessing by multiplying α(W)/256 with the minimum MIN(DR, DG, DB) tothe subtracters 1305-1307. the subtracters 1305-1307 calculates Eq. (15)and outputs C0 ₇₋₀, G0 ₇₋₀ and B0 ₇₋₀ after UCR processing.

C0=DR−MIN(DR, DG, DB)·α(W)/256,

M0=DG−MIN(DR, DG, DB)·α(W)/256,  (15)

and

Y0=DB−MIN(DR, DG, DB)·α(W)/256,

On the other hand, the operator performs an operation of Eq. (16) of aquantity of black toners BK on BP processing.

BK=(MIN(Dr, DG, DB)−k)·β(W)/256.  (16)

That is, the minimum is subtracted by undercolor level k (BPC) andmultiplies it with β(W)/256.

(L) Color Corrector

FIG. 41 shows a block diagram of the color corrector 1400 performing afollowing masking operation for suitable color reproduction:$\begin{matrix}{{{Eq}.\quad (17)}\quad} & \quad \\{\begin{pmatrix}C \\M \\Y\end{pmatrix} = {\begin{pmatrix}c_{11} & c_{12} & c_{13} & c_{14} & c_{15} & c_{16} & c_{17} \\m_{21} & m_{22} & m_{23} & m_{24} & m_{25} & m_{26} & m_{27} \\y_{31} & y_{32} & y_{33} & y_{34} & y_{35} & y_{36} & y_{37}\end{pmatrix}\quad \begin{pmatrix}c_{0} \\m_{0} \\y_{0} \\\{ {( {c_{0} + m_{0}} )/2} \}^{2} \\\{ {( {m_{0} + y_{0}} )/2} \}^{2} \\\{ {( {y_{0} + y_{0}} )/2} \}^{2} \\{- 1}\end{pmatrix}}} & (17)\end{matrix}$

The masking operation is performed to correct nonideal spectralcharacteristics of filters of the image sensor 14 and toners used forprinting an image on a sheet of paper, as shown in FIGS. 42 and 42. Themasking coefficients C₁₁-C₁₇, m₁₁-m₁₇ and y₁₁-y₁₇ are determinedaccording to following steps: First, a test print is read by the imagesensor 14 and a test print thereof is formed. Next, the test printprinted is is read by the image sensor 14. Then, the read data of thetest print are compared with those of the printed image, and thecoefficients are determined so that a difference between them becomessmallest. Actually, the masking coefficients c₁₁-c₁₇ are determined whencyan image is formed, m₁₁-m₁₇ are determined when a magenta image isformed, and y₁₁-y₁₇ are determined when a yellow image is forme.

In the circuit shown in FIG. 41, multipliers 1409, 1410 and 1411 receiveinput data of Co₇₋₀, Mo₇₋₀ and Yo₇₋₀ from the UCR/BP processor 1300.Further, operators 1402, 1403 and 1404 also receives the input data. Theoperators 1402, 1403 and 1404 receives Co, Go and Bo at A inputs thereofin this order and Mo, Bo and Co at B inputs thereof in this order. Then,the operators 1402, 1403 and 1404 average of the data received at the Aand B inputs, and the averages are sent to operators 1405, 1406 and 1407which divide a square of the input data with 256 and sent the result tomultipliers 1412, 1413 and 1414. The multipliers 1408-1414 receive themasking coefficients c₁₁-c₁₆, m₁₁-m₁₆ and y₁₁-y₁₆ as shown in FIG. 41from a controller 1401 to multiply it with the input data. Productsobtained by the multipliers 1409-1414 are sent to inputs A-G of anoperator 1407, while the masking coefficients c₁₇, m₁₇ and y₁₇ are sentdirectly to input F of the operator 1407. The operator 1407 sums thedata at the inputs A-F and subtract the data at the input G from thesum. Thus, the matrix operation of Eq. (17) is completed.

When a cyan, magenta or yellow image is formed, the controller 1401 ofcolor correction can set eight kinds of masking coefficients at the sametime, and the masking coefficients can be changed for each pixel (inreal time) by setting change signal MA₂₋₀ and a sepia area signal{overscore (SEPIA)}.

A selector 1416 selects the output data of the operator 1415 to aselector 1417 when H level of {overscore (CMY)}/K signal is received orcyan, magenta or yellow is printed, or it selects BK₇₋₀ data when Llevel of {overscore (CMY)}/K signal is received or black is printed.

On the other hand, the controller 1401 sends coefficients MM₇₋₀ incorrespondence to the multiplier 1408. The coefficients MM (C₁₈, M₁₈,Y₁₈, BK₁₈) are changed in each image forming process of cyan, magenta,yellow and black according to a monochromatic color to be reproduceddesignated by a user with the operational panel. The multiplier 1408multiplies it with the density data DV₁₇₋₁₀ for the monochromatic colorto supply a monochromatic color data to the selector 1417.

The controller 1401 further receives a monochromatic color area signal{overscore (COLMONO)} and a monochromatic area signal {overscore(BKMONO)} for each pixel. These signals are also received by an AND gate1418. If the signals {overscore (COLMONO)} and {overscore (BKMONO)} haveL level, or if the pixel data is a data in a full color mode area, theAND gate 1418 outputs a signal of L level to the selector 1417. Then,the selector 1417 selects a full color data received from the selectoras an output data VIDEO₇₋₀. On the other hand, if at least one of thesignals {overscore (COLMONO)} and {overscore (BKMONO)} has H level, orif the pixel data is a data in a monochromatic color mode area or in amonochromatic mode area, the AND gate 1418 outputs a signal of H levelto the selector 1417. Then, the selector 1417 selects the monochromaticcolor data received from the multiplier 1418 as an output data VIDEO₇₋₀.

(M) Region Discriminator

FIGS. 44A and 44B are block diagrams of the region discriminator 1500which discriminates black character areas and dot image areas in adocument image. The discrimination of black characters comprises foursteps of (a) detection of a character (edge), (b) detection of blackpixel, (c) detection of a region which is liable to be detected asblack, and (d) generation of black edge reproduction signal which isperformed by the MTF corrector 1600. The first to third steps areexplained below in detail.

(M-1) Detection of Character (Edge)

First, detection of a character (edge) is explained in detail. Acharacter has two elements of edge parts and uniform parts interposed byedge parts. If a character is thin, it has only edge portions. Then, theexistence of a character is decided by detecting edges.

In the region discriminator 1500 shown in FIG. 44A, the lightness signalV₇₋₀ generated by the HVC converter 1100 is received through anegative/positive inverter 1501 to a line memory 1502. If {overscore(NEGA)} signal set by an operator with the operational panel is L level,the inverter 1501 inverts the input data.

The data in the line memory is sent to primary differential filters 1503and 1504 shown in FIGS. 45 and 46 for the main scan direction and forthe subscan direction each having a 5*5 matrix and to a secondarydifferential filter 1508 shown in FIG. 47. In this embodiment, edges aredetected with two kinds of differential filter because each has afeature. FIG. 48A shows lightness distribution of five lines withdifferent size from each other. Further, FIG. 48B shows primarydifferentials for the five lines, and FIG. 48C shows secondarydifferentials for the five lines. The primary differential filteroutputs a higher detection value than the secondary one at an edge of athick line (of a width of four pixels or larger). That is, the primarydifferential filter is suitable for detecting a thick edge of a width offour pixels or larger, while the secondary differential filter issuitable for detecting a thin edge of a width less than four pixels. Inthe region discriminator 1500, an edge of a character is detected if atleast one of the primary and secondary filters outputs a value largerthan a threshold value. Then, the detection precision of edge can bemaintained irrespective of a width of a line.

The primary differential filters 1503 and 1504 along the main scandirection and along the subscan direction receive data read from theline memory 1502. The obtained differentials are sent to absolute valuecircuits 1505 and 1506 to obtain absolute values thereof. The absolutevalues are needed because the primary differential filters 1403 and 1504have negative coefficients. Then, an operator 1507 receives the absolutevalues and outputs an average FL₁₇₋₁₀ thereof. The average is used totake two differentials along the two directions into account. Theaverage FL₁₇₋₁₀ of the first differentials is sent to comparators 1521,1523, 1525 and 1527 for edge decision.

The secondary differential filter 1508 receives data from the linememory 1502 and an obtained second differential D₇₋₀ is output to anabsolute value circuit 1509 to output an absolute value FL₂₇₋₂₀ thereof.The absolute value is needed because the secondary differential filter1408 also have negative coefficients. The absolute value FL₂₇₋₂₀ of thesecondary differential is sent to comparators 1522, 1524, 1526 and 1528for edge decision. The secondary differential D₇₋₀ is also sent to aVMTF table 1512 shown in FIG. 55. The VMTF table 1512 outputs lightnessedge component VMTF₇₋₀ in correspondence to the secondary differentialD₇₋₀.

The comparator 1521 for edge decision shown in FIG. 44B compares thefirst differential FL₁₇₋₁₀ with a first edge reference levelEDGREF₁₇₋₁₀, and it outputs a signal of L level if the firstdifferential FL₁₇₋₁₀ is larger than the first edge reference levelEDGREF₁₇₋₁₀. On the other hand, the comparator 1522 for edge decisioncompares the second differential FL₂₇₋₂₀ with a second edge referencelevel EDGREF₂₇₋₂₀, and it outputs a signal of L level if the seconddifferential FL₂₇₋₂₀ is larger than the second edge reference levelEDGREF₂₇₋₂₀. An AND gate 1533 receives the results of the comparison bythe comparators 1521, 1522 and it outputs an {overscore (EG)} signal ifa signal of L level is received from at least one of the comparators1521 and 1522. The {overscore (EG)} signal means an edge.

(M-2) Decision of Black Pixel

Next, decision of black pixel is explained in detail. Black is detectedbased on chroma W₇₋₀, or if the chroma W₇₋₀ is smaller than a referencevalue, the pixel is decided as black. However, the value of chroma W₇₋₀may become high for a black pixel. For example, when the image sensor 14vibrates when the image is read, the phases of data of red, green andblue may shift slightly relative to each other, as shown at a graph atan upper part in FIG. 49. In this case, the chroma W₇₋₀ becomes large asshown in another graph at a lower part in FIG. 49. If the pixel isdecided if the chroma W₇₋₀ is smaller than a reference value, the pixelis erroneously decided as a color pixel. Then, in this embodiment,erroneous decision can be prevented by smoothing the chroma data beforethe decision. That is, the chroma data W₇₋₀ is first received from theHVC converter 1100 by another line memory 1514, and it is smoothed by afilter 1515 of 3*3 matrix shown in FIG. 50. Chroma data WS₇₋₀ aftersmoothing has a more gradual value, as shown in the lower part in FIG.49. Then, the above-mentioned type of erroneous decision can beprevented.

A comparator 1529 receives the chroma data WS₇₋₀ and compares it with achroma reference data WREF₇₋₀. If the chroma data WS₇₋₀ is smaller thanthe chroma reference data WREF₇₋₀, the pixel is decided to be black, andthe comparator 1529 sends {overscore (BK)} signal to an AND gate 1537.The chroma reference data WREF₇₋₀ is determined by the WREF table 1513according to the lightness data V₇₋₀. As shown in FIG. 51, the WREFtable 1513 has a feature that if the lightness data V₇₋₀ is larger thana predetermined value, WREF7-0 is decreased linearly with the lightnessV₇₋₀. This takes into account that black pixels determined erroneouslywill become evident. The AND gate 1537 outputs {overscore (BKEG)} whichmeans an edge of a black pixel if the pixel is a pixel at an edge({overscore (EG)}=L) it is a black pixel ({overscore (BK)}=L) and{overscore (BKEGEN)}=L.

(M-3) Decision of a Region Liable to be Detected as Black Character

Next, the detection of a region which is liable to be detected as blackcharacter is explained in detail. If only the detection of a character(edge) and the detection of black pixel mentioned above are performed, acharacter having a low lightness V₇₋₀ and a low chroma WS₇₋₀ such asdark blue and deep green is liable to be decided erroneously as an edgeof a black character. Further, if a color and its complementary color,such as cyan and yellow, as shown in FIG. 56A, are adjacent to eachother, and image data of red, green and blue are read as shown in FIG.52B, the chroma WS₇₋₀ may become low at the boundary between them orchange to black there, as shown in FIG. 52C. Such a point is also liableto be decided erroneously as an edge of a black character. For example,such an erroneous decision may happen when a blue character is printedon a background of yellow.

In order to solve the problem, a uniform color part is detected in theembodiment. Then, even if the pixel is decided a black pixel, thedecision is canceled if it is located in a region of uniform color part.Thus, a black character can be decided more precisely.

The uniform color part has features that it is not an edge, that it is apixel in a color mode area and that a number of pixel having lowlightness exceeds a certain number within a prescribed area. Then, theuniform color part is detected as follows: The comparators 1423 and 1524decide that the outputs FL₁₇₋₁₀ and FL₂₇₋₂₀ of the primary and secondarydifferential filters are lower than third and fourth edge referencelevels EDGREF₃₇₋₃₀ and EDREF₄₇₋₄₀, an AND gate 1534 outputs signal{overscore (BETA1)} which means a pixel not existing at an edge.Further, if a comparator 1530 decides that the chroma data WS7-0 issmaller than a reference value WREF₂₇₋₂₀, it outputs a signal {overscore(COL)} which means a color data. Further, if a comparator 1531 decidesthat the lightness data V₁₇₋₁₀ is smaller than a reference valueVREF₁₇₋₁₀, it outputs a signal {overscore (VL₁)}. Then, the AND gate1538 receives the signals {overscore (BETA1)}, {overscore (COL)} and{overscore (VL₁)} and outputs a signal {overscore (CAN)} which meansthat the pixel is not at an edge, that the pixel is in a color mode areaand that the pixel has a low lightness. Then, the pixel is taken as auniform part having a chromatic color not located in a background. Acounter 1542 counts the number of the signals {overscore (CAN)} in theunit of 9*9 pixels. If the number Cnt₁₇₋₁₀ of the signals {overscore(CAN)} is smaller than a reference value Cntref₇₋₀, a comparator 1542outputs a signal {overscore (BKEGON)}.

An AND gate 1544 outputs the above-mentioned signal {overscore (BKEG)}delayed by a delay circuit 1541 and the above-mentioned signal{overscore (BKEGON)}. That is, even when the signal {overscore (BKEG)}on the decision of a black edge is received, if the signal {overscore(BKEGON)} is not received or if the pixel is located in a uniform colorpart, the decision of black edge is canceled, and the AND gate 1544 doesnot output a signal {overscore (PAPA)}. In other words, edge emphasis isperformed only for a black character in a monochromatic background. Onthe other hand, the number of pixels of a uniform color part is lessthan the prescribed reference value, the decision of black edge is keptto be valid.

(M-4) Decision of Dot Area

Next, decision of dot area is explained in detail. Dot area means anarea of an image composed of dots. As shown in FIG. 44A, the filters1510 and 1511 for detection white dots and black dots receive dataoutput from the line memory 1502. Each filter decides if a pixel underinterest is larger (white dots) or smaller (black dots) than a levelAMIREF₇₋₀ along the all directions with respect to an average of twopixels surrounding the pixel under interest along eight directions, asshown in FIG. 53. Further, if the pixel under interest is larger thanthe eight adjacent pixels, it is decided as a white dot ({overscore(WAMI)}=L), while if the pixel under interest is smaller than the eightadjacent pixels, it is decided as a black dot ({overscore (KAMI)}=L).

In concrete, the filter 1510 for detecting white dots shown in FIG. 44Aoutputs a signal {overscore (WAMI)} of L level when each condition ofEq. (18) is satisfied and each condition of Eq. (19) is satisfied.Further, the filter 1511 for detecting black dots shown in FIG. 44A alsooutputs a signal {overscore (KAMI)} of L level when each condition ofEq. (18) is satisfied and each condition of Eq. (19) is satisfied.$\begin{matrix}{{{{X - {( {a_{11} + a_{22}} )/2}} > {AMIREF}_{7 - 0}},{{X - {( {a_{31} + a_{32}} )/2}} > {AMIREF}_{7 - 0}},{{X - {( {a_{51} + a_{42}} )/2}} > {AMIREF}_{7 - 0}},{{X - {( {a_{53} + a_{43}} )/2}} > {AMIREF}_{7 - 0}},{{X - {( {a_{55} + a_{44}} )/2}} > {AMIREF}_{7 - 0}},{{X - {( {a_{35} + a_{34}} )/2}} > {AMIREF}_{7 - 0}},{{X - {( {a_{15} + a_{24}} )/2}} > {AMIREF}_{7 - 0}},{and}}{{X - {( {a_{13} + a_{23}} )/2}} > {{AMIREF}_{7 - 0}.}}} & (18) \\{{{X > a_{22}},{X > a_{32}},{X > a_{42}},{X > a_{43}},{X > a_{44}},{X > a_{34}},{X > a_{24\quad}},{and}}{X > {a_{23}.}}} & (19)\end{matrix}$

Further, the filter 1511 for detecting black dots shown in FIG. 44A alsooutputs a signal {overscore (KAMI)} of L level when each condition ofEq. (20) is satisfied and each condition of Eq. (21) is satisfied.$\begin{matrix}{{{{X - {( {a_{11} + a_{22}} )/2}} < {AMIREF}_{7 - 0}},{{X - {( {a_{31} + a_{32}} )/2}} < {AMIREF}_{7 - 0}},{{X - {( {a_{51} + a_{42}} )/2}} < {AMIREF}_{7 - 0}},{{X - {( {a_{53} + a_{43}} )/2}} < {AMIREF}_{7 - 0}},{{X - {( {a_{55} + a_{44}} )/2}} < {AMIREF}_{7 - 0}},{{X - {( {a_{35} + a_{34}} )/2}} < {AMIREF}_{7 - 0}},{{X - {( {a_{15} + a_{24}} )/2}} < {AMIREF}_{7 - 0}},{and}}{{X - {( {a_{13} + a_{23}} )/2}} < {{AMIREF}_{7 - 0}.}}} & (20) \\{{{X < a_{22}},{X < a_{32}},{X < a_{42}},{X < a_{43}},{X < a_{44}},{X < a_{34}},{X < a_{24}},{and}}{X < {a_{23}.}}} & (21)\end{matrix}$

The counters 1550 and 1551 receive signals {overscore (WAMI)} and{overscore (KAMI)} output by the filters 1510 and 1511, and they count anumber of signals of L level in a 41*9 pixel matrix. The counts thereofare sent to a maximum detector 1552 which outputs a maximum thereofAmicnt₇₋₀ to four comparators 1553-1556. The comparators 1553-1556compare it with four steps of reference levels CNTREF₁₇₋₁₀, CNTREF₂₇₋₂₀,CNTREF₃₇₋₃₀ and CNTREF₄₇₋₄₀ to quantize it, and they output {overscore(AMI0)}, {overscore (AMI1)}, {overscore (AMI2)} and {overscore (AMI3)}if it is larger than the reference signals (refer to FIG. 54).

(M-5) Other Types of Decision

The region discriminator 1500 further decides some points explainedbelow. A comparator 1532 is provided to decide a high light area. Itcompares the lightness data V₇₋₀ with a second reference levelVREF₂₇₋₂₀, and if the lightness data V₇₋₀ is larger than the secondreference level VREF₂₇₋₂₀, it outputs a signal {overscore (VH1)} whichmeans that the pixel exists in a highlight area. The comparators 1527and 1528 are provided to decide an area not located at an edge. Theycompare the first differential FL₁₇₋₁₀ and the second differentialFL₂₇₋₂₀ with seventh and eighth reference levels EDGref₇₇₋₇₀ andEDGref₈₇₋₈₀. If the first differential FL₁₇₋₁₀ and the seconddifferential FL₂₇₋₂₀ are smaller than seventh and eighth referencelevels EDGref₇₇₋₇₀ and EDGref₈₇₋₈₀, a signal {overscore (BETA2)} whichmeans a pixel not located at an edge is sent to an AND gate 1536. TheAND gate 1536 also receives the above-mentioned {overscore (VH1)} signalfrom the comparator 1531, and it outputs a signal {overscore (HLIGHT)}which means a highlight area through a delay circuit 1546.

The comparators 1525 and 1526 also receive the first differentialFL₁₇₋₁₀ and the second differential FL₂₇₋₂₀ and compare them with fifthand sixth reference levels EDGref₅₇₋₅₀ and EDGref₆₇₋₆₀. If the firstdifferential FL₁₇₋₁₀ and the second differential FL₂₇₋₂₀ are larger thanthe reference levels EDGref₅₇₋₅₀ and EDGref₆₇₋₆₀, signals of L level aresent to an NOR gate 1525. If a signal is received from either of thecomparators 1525 and 1526, the NOR gate 1525 outputs a signal {overscore(EG2)} which means an edge highlight area through a delay circuit 1546as a signal {overscore (MAMA)}.

(N) MTF Corrector

FIGS. 56A and 56B show block diagrams of the MTF corrector 1600 whichperforms edge emphasis and smoothing most suitable for the image dataVIDEO₇₋₀ and MVIDEO₇₋₀ received from the color corrector 1400 accordingto the kind of pixels recognized by the signals ({overscore(AMI0)}-{overscore (AMI3)}, {overscore (MAMA)}, {overscore (PAPA)},{overscore (EDG)} and {overscore (HLIGHT)}) and printing situationrecognized by status signals ({overscore (MODE)}, {overscore (CMY)}/K,{overscore (BKER)}, {overscore (COLER)}). Further, a duty ratio of laseremission is changed according to the kind of image recognized by theregion discriminator 1500. Still further, a prescribed value is added topixel data at edges to correct amounts of excess or deficient toners.

The MTF corrector 1600 recognizes the color of toners based on{overscore (CMY)}/K signal. If the signal is L level, toners of cyan,magenta or yellow is printed. It also recognizes one of following modesby using three signals {overscore (MODE)}, {overscore (BKER)} and{overscore (COLER)}: Full color standard mode ({overscore (BKER)}=H,{overscore (COLER)}=L and {overscore (MODE)}=H), full color photographicmode ({overscore (BKER)}=H, {overscore (COLER)}=H and {overscore(MODE)}=L), monochromatic color standard mode ({overscore (BKER)}=H,{overscore (COLER)}=L and {overscore (MODE)}=H), monochromatic colorphotograph mode ({overscore (BKER)}=H, {overscore (COLER)}=L and{overscore (MODE)}=L), monochromatic standard mode ({overscore(BKER)}=L, {overscore (COLER)}=L and {overscore (MODE)}=H), andmonochromatic photographic mode ({overscore (BKER)}=L, {overscore(COLER)}=L and {overscore (MODE)}=L). Further, it recognizes the kind ofa pixel to be printed by using the result of region discrimination asfollows: A highlight region of uniform density ({overscore (HLIGHT)}=L),a non-edge region ({overscore (HLIGHT)}=H, {overscore (EDG)}=H,{overscore (PAPA)}=H), a color edge region ({overscore (HLIGHT)}=H,{overscore (EDG)}=L, {overscore (PAPA)}=H), and a black edge region({overscore (HLIGHT)}=H, {overscore (EDG)}=L, {overscore (PAPA)}=L).

(N-1) Explanation of Various Modes

Before explaining the MTF corrector 1600, MTF correction in each modementioned above is explained. First, MTF correction in the full colorstandard mode ({overscore (MODE)}=H, {overscore (BKER)}=H and {overscore(COLER)}=L) is explained. Table 5 compiles signal levels of varioussignals received by a controller 1601, printing situations representedby the levels and signals of DMPX0, DMPX1, DMPX5 and DMPX6.

TABLE 5 Full color standard mode {overscore (CMY)}/K {overscore(HLIGHT)} {overscore (EDG)} {overscore (PAPA)} DMPX1 DMPX0 USM DMPX6DMPX5 VIDEO L L — — highlight L H 0 H L FSD (CMY H H H non-edge L H 0 HH SD mode) H L H color H H DMTF H H SD edge H L L black L L 0 L H MINedge H L — — highlight L H 0 H L FSD (BK H H H non-edge L H 0 H H SDmode) H L H color L H 0 H H SD edge H L L black H L VMTF H H SD edge

First, MTF correction of a pixel at a black edge ({overscore(HLIGHT)}=H, {overscore (EDG)}=L, {overscore (PAPA)}=L) is explained.When black toners are used for printing ({overscore (CMY)}/K=H),VIDE₃₇₋₃₀ is obtained by adding edge component VMTF₇₋₀ of lightness toordinary image data SD₇₋₀ for edge emphasis. The edge component VMTF₇₋₀of lightness is used instead of an edge component DMTF₇₋₀ of densitybecause the former is more sensitive than the latter on an edge due tobackground. If the pixel composes a dot image, the edge emphasiscomponent (or VMTF₇₋₀) is limited according to the degree or density ofdots. For example, the edge emphasis component is limited to decreaselinearly or stepwise. Thus, a Moire pattern is prevented to occur.

When cyan, magenta or yellow toners are used for printing ({overscore(CMY)}/K=L), edge emphasis is not performed on a pixel at a black edge,and a minimum data MIN₇₋₀ is obtained in a 5*5 or 3*3 matrix as outputdata VIDEO₃₇₋₃₀. That is, the minimum data is obtained in a prescribedarea including the pixel. Then, a very narrow extended line at an edgeas shown in FIG. 63A in an area.represented with a dashed circle can beremoved as shown in FIG. 63B. By using the minimum data MIN₇₋₀, imagedata can be decreased to zero only inside a black character. Then, theblack character can be printed with edge emphasis without whiteperipheral lines as shown in FIG. 64A. If image data of cyan, magenta oryellow is subtracted by, for example, an edge detection quantity (suchas FL₁₇₋₁₀ or FL₂₇₋₂₀ in this embodiment), white peripheral lines asshown in FIG. 64A are observed.

For a pixel in a color edge region ({overscore (HLIGHT)}=H, {overscore(EDG)}=L, {overscore (PAPA)}=H), edge emphases is not performed whenblack toners are used in printing ({overscore (PAPA)}=H), and ordinarypixel data SD₇₋₀ is used as VIDEO₃₇₋₃₀. In other words, edge emphasis isnot performed for an edge of a color character for black printing sothat black fringe of a color character can be prevented. On the otherhand, when cyan, magenta or yellow toners are used for printing, densityedge component DTMF₇₋₀ is added to the ordinary pixel data SD₇₋₀ asVIDEO₃₇₋₃₀.

For a pixel in a highlight region of uniform density ({overscore(HLIGHT)}=L), edge emphasis is not performed, and FSD₇₋₀ subjected tosmoothing is used as image data VIDEO₃₇₋₃₀. Then, noises in thehighlight region becomes not noticeable.

For a pixel in a non-edge region ({overscore (HLIGHT)}=H, {overscore(EDG)}=H, {overscore (PAPA)}=H), edge emphasis is not performed andordinary image data SD₇₋₀ is used as image data VIDEO₃₇₋₃₀.

Next, MTF correction in the full color photographic mode ({overscore(BKER)}=H, {overscore (COLER)}=H and {overscore (MODE)}=L) is explained.Table 6 compiles signal levels of various signals received by thecontroller 1601, printing situations represented by the levels andsignals of DMPX0, DMPX1, MDMPX5 and DMPX6.

TABLE 6 Full color standard mode {overscore (CMY)}/K {overscore(HLIGHT)} {overscore (EDG0)} {overscore (PAPA)} DMPX1 DMPX0 USM DMPX6DMPX5 VIDEO L L — — highlight L H 0 H L FSD (CMY H H H non-edge L H 0 HL FSD mode) H L H color H H DMTF H L FSD edge H L L black H H DMTF H LFSD edge H L — — highlight L H 0 H L FSD (BK H H H non-edge L H 0 H LFSD mode) H L H color H H DMTF H L FSD edge H L L black H H DMTF H L FSDedge

For a pixel in a black edge region ({overscore (HLIGHT)}=H, {overscore(EDG)}=L, {overscore (PAPA)}=L) and in a color edge region ({overscore(HLIGHT)}=H, {overscore (EDG)}=L, {overscore (PAPA)}=H), edge emphasesis performed by adding density edge component DMTF₇₋₀ to FSD₇₋₀subjected to smoothing to output the sum as VIDEO₃₇₋₃₀ so as not todeteriorate gradation characteristics of half-tone pixels. Thus, edgeemphasis is performed suitably without deteriorating gradationcharacteristics.

For a pixel in a highlight region of uniform density ({overscore(HLIGHT)}=L), edge emphasis is not performed, and FSD₇₋₀ subjected tosmoothing is used as image data VIDEO₃₇₋₃₀. Then, noises in thehighlight region becomes not noticeable.

For a pixel in a non-edge region ({overscore (HLIGHT)}=H, {overscore(EDG)}=H, {overscore (PAPA)}=H), edge emphasis is not performed andimage data FSD₇₋₀ subjected to smoothing is used as image dataVIDEO₃₇₋₃₀. Thus, the gradation characteristics of a photography imagecan be maintained.

Next, MTF correction in the monochromatic color standard mode({overscore (BKER)}=H, {overscore (COLER)}=L and {overscore (MODE)}=H)is explained. Table 7 compiles signal levels of various signals receivedby the controller 1601, printing situations represented by the levelsand signals of DMPX0, DMPX1, MDMPX5 and DMPX6.

TABLE 7 Monochromatic color standard mode {overscore (CMY)}/K {overscore(HLIGHT)} {overscore (EDG0)} DMPX1 DMPX0 USM DMPX6 DMPX5 VIDEO — L —highlight L H 0 H L FSD H H non-edge L H 0 H H SD L H L CMY mode, L LDMTF H H SD edge H H L BK mode, L H 0 H H SD edge

For a pixel in a black edge region ({overscore (HLIGHT)}=H, {overscore(EDG)}=L, {overscore (PAPA)}=L) and in a color edge region ({overscore(HLIGHT)}=H, {overscore (EDG)}=L, {overscore (PAPA)}=H), edge emphasisis not performed when black toners are used in printing, and ordinaryimage data SD₇₋₀ is used as VIDEO₃₇₋₃₀, while edge emphasis is performedwhen cyan, magenta or yellow toners are used in printing, by addingdensity edge component DMTF₇₋₀ to ordinary pixel data SD₇₋₀ to outputthe sum as VIDEO₃₇₋₃₀. Thus, black fringe can be prevented.

For a pixel in a highlight region of uniform density ({overscore(HLIGHT)}=L), edge emphasis is not performed, and FSD₇₋₀ subjected tosmoothing is used as image data VIDEO₃₇₋₃₀. Then, noises in thehighlight region becomes not noticeable.

For a pixel in a non-edge region ({overscore (HLIGHT)}=H, {overscore(EDG)}=H, {overscore (PAPA)}=H), edge emphasis is not performed andimage data FSD₇₋₀ subjected to smoothing is used as image dataVIDEO₃₇₋₃₀.

Next, MTF correction in the monochromatic color photography mode({overscore (BKER)}=H, {overscore (COLER)}=L and {overscore (MODE)}=L)is explained. Table 8 compiles signal levels of various signals receivedby the controller 1601, printing situations represented by the levelsand signals of DMPX0, DMPX1, MDMPX5 and DMPX6.

TABLE 8 Monochromatic color photography mode {overscore (CMY)}/K{overscore (HLIGHT)} {overscore (EDG0)} DMPX1 DMPX0 USM DMPX6 DMPX5VIDEO — L — highlight L H 0 H L FSD H H non-edge L H 0 H L FSD L H L CMYmode, L L DMTF H L FSD edge H H L BK mode, L H 0 H L FSD edge

For a pixel in a black edge region ({overscore (HLIGHT)}=H, {overscore(EDG)}=L, {overscore (PAPA)}=L) and in a color edge region ({overscore(HLIGHT)}=H, {overscore (EDG)}=L, {overscore (PAPA)}=H), edge emphasesis performed only when cyan, magenta or yellow toners are used inprinting, by adding density edge component DMTF₇₋₀ to FSD₇₋₀ subjectedto smoothing to output the sum as VIDEO₃₇₋₃₀ so as not to deteriorategradation characteristics of half-tone pixels. Thus, a black fringe of acolor character can be prevented.

For a pixel in a highlight region of uniform density ({overscore(HLIGHT)}=L), edge emphasis is not performed, and FSD₇₋₀ subjected tosmoothing is used as image data VIDEO₃₇₋₃₀. Then, noises in thehighlight region becomes not noticeable.

For a pixel in a non-edge region ({overscore (HLIGHT)}=H, {overscore(EDG)}=H, {overscore (PAPA)}=H), edge emphasis is not performed andimage data FSD₇₋₀ subjected to smoothing is used as image dataVIDEO₃₇₋₃₀. Next, MTF correction in the monochromatic standard mode({overscore (BKER)}=L, {overscore (COLER)}=L and {overscore (MODE)}=H)is explained. Table 9 compiles signal levels of various signals receivedby the controller 1601, printing situations represented by the levelsand signals of DMPX0, DMPX1, MDMPX5 and DMPX6.

TABLE 9 Monochromatic standard mode {overscore (CMY)}/K {overscore(HLIGHT)} {overscore (EDG0)} DMPX1 DMPX0 USM DMPX6 DMPX5 VIDEO — L —highlight L H 0 H L FSD H H non-edge L H 0 H H SD L H L CMY mode, L L 0H H SD edge H H L BK mode, H L VMTF H H SD edge

For a pixel in a black edge region ({overscore (HLIGHT)}=H, {overscore(EDG)}=L, {overscore (PAPA)}=L) and in a color edge region ({overscore(HLIGHT)}=H, {overscore (EDG)}=L, {overscore (PAPA)}=H), edge emphasisis performed when black toners are used in printing, by adding lightnessedge component VMTF7-0 to ordinary pixel data SD₇₋₀ to output the sum asVIDEO₃₇₋₃₀, while edge emphasis is not performed when cyan, magenta oryellow toners are used in printing, and ordinary image data SD₇₋₀ isused as VIDEO₃₇₋₃₀.

For a pixel in a highlight region of uniform density ({overscore(HLIGHT)}=L), edge emphasis is not performed, and FSD₇₋₀ subjected tosmoothing is used as image data VIDEO₃₇₋₃₀. Then, noises in thehighlight region becomes not noticeable.

For a pixel in a non-edge region ({overscore (HLIGHT)}=H, {overscore(EDG)}=H, {overscore (PAPA)}=H), edge emphasis is not performed andordinary image data SD₇₋₀ is used as image data VIDEO₃₇₋₃₀.

Finally, MTF correction in the monochromatic photography mode({overscore (BKER)}=L, {overscore (COLER)}=L and {overscore (MODE)}=L)is explained. Table 10 compiles signal levels of various signalsreceived by the controller 1601, printing situations represented by thelevels and signals of DMPX0, DMPX1, MDMPX5 and DMPX6.

TABLE 10 Monochromatic photography mode {overscore (CMY)}/K {overscore(HLIGHT)} {overscore (EDG0)} DMPX1 DMPX0 USM DMPX6 DMPX5 VIDEO — L —highlight L H 0 H L FSD H H non-edge L H 0 H L FSD L H L CMY mode, L H 0H L FSD edge H H L BK mode, H H DMTF H L FSD edge

For a pixel in a black edge region ({overscore (HLIGHT)}=H, {overscore(EDG)}=L, {overscore (PAPA)}=L) and in a color edge region ({overscore(HLIGHT)}=H, {overscore (EDG)}=L, {overscore (PAPA)}=H), edge emphasesis performed by adding density edge component DMTF₇₋₀ to FSD₇₋₀subjected to smoothing to output the sum as VIDEO₃₇₋₃₀ so as not todeteriorate gradation characteristics of half-tone pixels.

For a pixel in a highlight region of uniform density ({overscore(HLIGHT)}=L), and for a pixel in a non-edge region ({overscore(HLIGHT)}=H, {overscore (EDG)}H, {overscore (PAPA)}=H), edge emphasis isnot performed and image data FSD₇₋₀ subjected to smoothing is used asimage data VIDEO₃₇₋₃₀.

(N-2) MTF Correction

Next, MTF (mutual transfer) correction performed by the MTF corrector1600 shown in FIGS. 56A and 56B is explained. A controller 1601 for MTFcorrection parameters receives control signals {overscore(AMI0)}-{overscore (AMI3)}, {overscore (HLIGHT)}, {overscore (EDG)},{overscore (PAPA)} and {overscore (MAMA)} from the region discriminator1500. Further, the controller receives control signals {overscore(MODE)}, {overscore (CMY)}/K, {overscore (BKER)} and {overscore(COLER)}. The signal {overscore (MODE)} represents a kind of a documentset by the key 78 in the operational panel, and it is set to be L levelin the photography modes and H level in the standard modes. The signal{overscore (CMY)}/K is a status signal representing a printingsituation, and it is set to be L level for printing with cyan, magentaor yellow toners and H level for printing with black toners. The signal{overscore (BKER)} requires signal processing in the monochromaticmodes. The signal {overscore (COLER)} requires signal processing in themonochromatic color modes. The signals {overscore (BKER)} and {overscore(COLER)} are signals on a region. The controller 1601 suppliesDMPX0-DMPX6 shown in Tables 5-10 and a signal LIMOS shown in Table 11.

TABLE 11 Setting of duty ratio MODE {overscore (MAMA)} {overscore(AMI0)} LIMOS H L — L — L L H H H L — — H

The signal LIMOS changes a duty ratio of the laser diode emittingaccording to the image data. A period when the laser diode does not emitmay be provided in one pixel clock cycle. In such a case, the duty ratiois defined as a ratio of the laser emission period in one pixel clockcycle. FIG. 57 shows a timing chart on driving the laser diode whereintwo types of a driving signal for the laser diode (LD) having dutyratios of 100% and 80% are shown. If the signal LIMOS=L, the duty ratiois set to be 100% in order to prevent a Moire pattern. If the signalLIMOS=H, the duty ratio is set to be 80% to reduce noises between linesalong the main scan direction. If {overscore (MODE)}=H or the pixel isat an edge or in a dot in a cot image in the standard modes, the signalLIMOS is set to be L in order to improve the reproducibility at an edgeand in a dot image. On the other hand, in the photography modes and at anon-edge region in the standard modes, the signal LIMOS=H to providenon-emitting periods in order to make noises between lines unnoticeable.

The signals {overscore (MODE)}, {overscore (CMY)}/K, {overscore (BKER)}and {overscore (COLER)} and an inverted signal of the signal {overscore(PAPA)} are also sent to a NAND gate 1602. Then, the NAND gate 1602outputs a signal DMPX7 to a selector 1603 only when black is printed ata black edge in the full color standard copy mode. The selector 1603selects the lightness data MVIDEO₇₋₀ subjected to the masking processingor the density data VIDEO₇₋₀ according as the signal DMPX7 is L level ornot.

The selector 1603 receives image data MVIDEO₇₋₀ subjected to maskingprocessing at A input and image data VIDEO₇₋₀ converted to density at Binput in the order or cyan, magenta, yellow and black. The data selectedby the selector 1603 is supplied, through a line memory 1604 storingdata of 5*5 matrix to a Laplacian filter, to a Laplacian filter 1605,smoothing filters 1607, 1608 and 1609, a filter 1612 for detecting aminimum in a 5*5 matrix, a filter 1613 for detecting a minimum in a 3*3matrix, and a print edge corrector 1615.

The Laplacian filter 1605, shown in FIG. 58, converts a data on a pixelunder interest at the center to an enhanced data, and sends it to a DMTFtable 1606. The DMTF table performs conversion shown in FIG. 59 andsends a conversion data as density edge emphasis component data DMTF₇₋₀.

The smoothing filters 1607, 1608 and 1609 smoothens the input data to300, 200 and 100 dpi, and FIGS. 60-62 show examples of the threefilters. The data subjected to smoothing as well as the data withoutsubjected to smoothing is sent to a controller 1610 for smoothingfilters. The controller 1610 also receives the change signal SH₂₋₀ fromthe HVC converter 1100 set by the image quality controller 1103 shown inFIG. 31. The controller 1610 selects one of the input data according tothe change signal SH₂₋₀ and sends it as SD₇₋₀. The change signal SH₂₋₀is also received by another controller 1611 of edge emphasis coefficientto select one of eight kinds of the edge emphasis coefficients as ED₇₋₀per each pixel (in real time), and change a plurality of sharpness up toeight areas simultaneously.

The filters 1612 and 1613 detect a minimum in a 5*5 matrix and in a 3*3matrix if a pixel under interest is placed at the center of the matricesand they sent the results to a selector 1614. The selector 1614 selectsone of them according to a selection signal FSEL2, and it sends it asMIN₇₋₀. The selection signal FSEL2 has been determined experimentally.As explained above, by using the minimum data MIN₇₋₀, image data can bedecreased to zero only inside a black character, and the black charactercan be printed with edge emphases without white peripheral lines asshown in FIG. 64A. On the other hand, if image data of cyan, magenta oryellow is subtracted by, for example, an edge detection quantity (suchas FL₁₇₋₁₀ or FL₂₇₋₂₀ in this embodiment), undesired white peripherallines as shown in FIG. 64A are observed.

The print edge corrector 1615 performs edge correction by taking intoaccount a print characteristic on transferring a toner image onto asheet of paper. The print characteristic means that more toners adhereto a start position while less toners adhere to an end position, asshown in FIG. 65B with a solid line. However, it is desirable that equalquantities of toners adhere to the start and end and positions. Suchprint characteristic occurs when image data changes largely at edgeswhile a data near the edges is about zero. Then, the corrector 1615corrects the data shown in FIG. 65A as shown in FIG. 65D. Then, as shownin FIG. 65B with a dashed line, the inequality can be reduced.

FIG. 66 shows the print edge corrector 1615 in detail. If a data underinterest is a data of an l-th pixel, a subtractor 1650 subtracts a dataof (l+1)-th pixel from the data of the l-th pixel and sends the resultto a comparator 1553. If the result is larger than a threshold valueREF₁₇₋₁₀, the comparator 1653 sends a signal to input S₀ of a selector1655. A subtractor 1651 subtracts a data of the l-th pixel from the dataof the (l−1)-th pixel and sends the result to a comparator 1554. If theresult is larger than a threshold value REF₂₇₋₂₀, the comparator 1654sends a signal to input S₁ of the selector 1655. Further, if the data ofthe l-th data is smaller than a threshold value REF₃₇₋₃₀, a comparator1652 sends a signal to input S₂ of the selector 1655.

If the selector 1655 receives L level at the input S₂-S₀, the pixelunder interest is considered to exist between edges as shown in FIG.67B. In this case, the selector 1655 selects PD₇₋₀ after addition asADD₁₇₋₁₀. If the selector 1655 receives H level at the input S₁ and Llevel at the inputs SO₀ and S₂, the pixel under interest is consideredto exist at a leading edge and below a reference level as shown in FIG.67A. In this case, the selector 1655 selects PD₁₇₋₁₀ as ADD₁₇₋₁₀.Further, if the selector 1655 receives H level at the input SO₀ and Llevel at the inputs S₁-S₂, the pixel under interest is considered toexist at a trailing edge and below a reference level as shown in FIG.67C. In this case, the selector 1655 selects PD₂₇₋₂₀ as ADD₁₇₋₁₀.

Next, the MTF correction performed by the MTF corrector shown in FIG.56B is explained. As explained previously, selectors 1616 and 1617select one of lightness edge component VMTF₇₋₀, density edge componentDMTF₇₋₀ and edge emphasis quantity of zero according to the signalsDMPX0 and DMPX1 on the kind of pixel DMPX0 and DMPX1. The signals DMPX0and DMPX1 are defined in Tables 5-10 in the various modes and output bythe controller 1610 of the MTF correction parameters.

A selector 1622 receives ED₇₋₀ set by the CPU 1 directly and throughmultipliers 1619-1621 which multiply it with ¾, ½ and ¼, and selects oneof the four inputs according to parameters DMPX3 and DMPX2. Anotherselector 1623 receives the output of the selector 1622 and the zero, andselects one of the two inputs according to a parameter DMPX4. As shownin Table 12, the parameters DMPX4-DMPX2 are determined according tovalues of {overscore (AMI3)}-{overscore (AMI0)}. If all of {overscore(AMI)}3-{overscore (AMI0)} are H level or the pixel is not in a dotimage, the edge emphasis coefficient ED₇₋₀ is sent readily as ED₁₇₋₁₀ toan operator 1618. As explained previously, the region discriminator 1500changes {overscore (AMI0)}-{overscore (AMI3)} to L level successively asthe degree of dot image increases. Then, the controller 1601 for the MTFcorrection parameters changes DMPX4-DMPX1 according to the degree of dotimage, and the selectors 1622 and 1623 suppress edge emphasiscoefficients ED₇₋₀ according to results of dot detection {overscore(AMI0)}-{overscore (AMI3)}. The operator 1618 multiplies the edgeemphasis quantity USM₇₋₀ with the edge emphasis coefficient ED₁₇₋₁₀ anddivides the product with 128 to output USM₁₇₋₁₀.

TABLE 12 Decision of dot image {overscore (AMI3)} {overscore (AMI2)}{overscore (AMI1)} {overscore (AMI0)} DMPX4 DMPX3 DMPX2 ED L L L L L — —0 H L L L H L L ED/4 H H L L H L H ED/2 H H H L H H L 3ED/ 4 H H H H H HH ED

A selector 1626 receives data SD₇₋₀ directly and through a smoothingfilter 1625 and selects one of the inputs according to DMPX5. Further,another selector 1627 selects one of the output of the selector 1627 andMIN₇₋₀ according to DMPX6 to output VIDEO₁₇₋₁₀. The control signalsDMPX5 and DMPX6 are determined as shown in Tables 5-10.

An adder 1624 adds the edge emphasis quantity USM₁₇₋₁₀ to the pixel dataVIDEO₂₇₋₂₀. Another adder 1628 adds VIDEO₂₇₋₂₀ to ADD₁₇₋₁₀ to output asVIDEO₃₇₋₃₀. As explained above, the addition data ADD₁₇₋₁₀ is providedto add a pixel data at a leading edge or at a trailing edge.

(O) Gamma Corrector

The gamma corrector 1700 shown in FIG. 68 receives the image dataVIDEO₃₇₋₃₀ after the MTF correction, and it changes gamma correctioncurve according to an instruction by a user and corrects the image datato data of desired image quality. The image data VIDEO₃₇₋₃₀ and thechange signal GA₂₋₀ for changing the gamma correction table are receivedby a gamma correction table 1702. The change signal GA₂₋₀ are set by theimage quality controller 1103 shown in FIG. 31. The table 1702 changeseight gradation curves shown in FIGS. 69 and 70 in real time accordingto the change signal GA₂₋₀ as a BANK signal of the table. FIG. 69 showsgradation curves in correspondence to the change signal GA₂₋₀ in thebrightness control mode, while FIG. 70 shows gradation curves incorrespondence to the change signal GA₂₋₀ in the contrast control mode.The gamma correction table 1702 changes input data Din₇₋₀ (VIDEO₃₇₋₃₀)to output data Dout₇₋₀ (VIDEO₄₇₋₄₀).

An operator 1703 operates Eq. (22) based on the data VIDEO₄₇₋₄₀ outputfrom the gamma correction table 1702:

VIDEO₇₇₋₇₀=(VIDEO₄₇₋₄₀ −UDC ₇₋₀)·GDC ₇₋₀/128, ≦256.  (22)

That is VIDEO₇₇₋₇₀=256 if the operation at the left side exceeds 256. Asshown in Table 13, background clearance data UDC7-0 and slope correctiondata GDC₇₋₀ have eight kinds of data.

TABLE 13 Background clearance data UDC and slope correction data GDCGDC⁷⁻⁰ UDC⁷⁻⁰ 7 152 0 6 144 0 5 136 0 4 128 0 3 136 16 2 128 16 1 120 16

FIG. 71 shows a graph of VIDEO₇₇₋₇₀ plotted against VIDEO₄₇₋₄₀ forvarious values of CO₂₋₀ from 7 to 1. As shown in FIG. 72, backgrounddata UDC₇₋₀ is subtracted from VIDEO₄₇₋₄₀ and the slope is corrected byslope correction data GDC₇₋₀.

Although the present invention has been fully described in connectionwith the preferred embodiments thereof with reference to theaccompanying drawings, it is to be noted that various changes andmodifications are apparent to those skilled in the art. Such changes andmodifications are to be understood as included within the scope of thepresent invention as defined by the appended claims unless they departtherefrom.

What is claimed is:
 1. An image processing apparatus comprising: ascanner which reads a color document to provide color data; a conversionmeans for converting color data provided by said scanner to data ofcyan, magenta, yellow and black; a color balance means for adjustingcolor balance on one of the data of cyan, magenta, yellow and black; anda data control means for changing the data for each pixel of cyan,magenta, yellow and black according to the color balance adjusted bysaid color balance means while keeping a total of the data of cyan,magenta, yellow and black constant.
 2. The apparatus according to claim1, further comprising an image forming means for forming an image on asheet of paper based on the data of cyan, magenta, yellow and blackchanged by said data control means.
 3. The apparatus according to claim2, wherein when color balance is adjusted on data of a color of cyan,magenta and yellow, said color balance means increases the data of thecolor adjusted by an amount while decreases the data of the other twocolors different from the color adjusted by a half of the amount.
 4. Theapparatus according to claim 2, wherein when color balance is adjustedon data of black, said color balance means increases the data of blackby an amount while decreases the data of cyan, magenta and yellow by athird of the amount.
 5. An image processing method comprising the stepsof: providing color data of a color image; converting the color data todata of cyan, magenta, yellow and black; adjusting a color balance onone of the data of cyan, magenta, yellow and black; and changing thedata for each pixel of cyan, magenta, yellow and black according to theadjusted color balance while keeping a total of the data of cyan,magenta, yellow and black constant.
 6. The method according to claim 5,further comprising the step of: forming an image on a sheet of paperbased on the changed data of cyan, magenta, yellow and black.
 7. Themethod according to claim 6, wherein when the color balance is adjustedon data of a color of cyan, magenta and yellow, said color balanceadjusting step increases the data of the color adjusted by an amountwhile decreases the data of the other two colors different from thecolor adjusted by a half of the amount.
 8. The method according to claim6, wherein when the color balance is adjusted on data of black, saidcolor balance adjusting step increases the data of black by an amountwhile decreases the data of cyan, magenta and yellow by a third of theamount.